-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clearing cache with max age #63
Labels
bug
Something isn't working
Comments
Thanks, I will look into it over the next couple of days.
…________________________________
From: Thomas ***@***.***>
Sent: Thursday, November 16, 2023 8:59:23 AM
To: anywhichway/nano-memoize ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [anywhichway/nano-memoize] clearing cache with max age (Issue #63)
Hello,
I'm using your lib like this:
const memo = nanomemoize(fn, { maxAge: 7_200_000 })
memo()
...
memo.clear()
While calling memo.clear() clears the cache, the setTimeout<https://github.com/anywhichway/nano-memoize/blob/ca71d163db33fc894584133d3dc942cfb404f382/src/index.js#L44C46-L44C46> is not cleared and the process hangs.
—
Reply to this email directly, view it on GitHub<#63>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABF2US2AMSF3ZU3LOY2GA5LYEZA6XAVCNFSM6AAAAAA7OPMVPCVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE4TOMZRHE2TMMA>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
anywhichway
added a commit
that referenced
this issue
Nov 16, 2023
I added the timeout clear and published as 3.0.16. I did not write a unit test to check this (since I am currently out sailing). However, you could test. All existing unit tests pass. |
works |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I'm using your lib like this:
While calling
memo.clear()
clears the cache, the setTimeout is not cleared and the process hangs.The text was updated successfully, but these errors were encountered: