Closed darkship closed 12 months ago
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 setTimeouthttps://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 GitHubhttps://github.com/anywhichway/nano-memoize/issues/63, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABF2US2AMSF3ZU3LOY2GA5LYEZA6XAVCNFSM6AAAAAA7OPMVPCVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE4TOMZRHE2TMMA. You are receiving this because you are subscribed to this thread.Message ID: @.***>
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
Hello,
I'm using your lib like this:
While calling
memo.clear()
clears the cache, the setTimeout is not cleared and the process hangs.