-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Memory leak: old results are not deleted from the cache #14
Comments
Even if you can't submit a fix, submitting a pull request with a failing test would be very helpful. |
@sindresorhus @keithamus Is there a fix for this? it is blowing out my servers memory at volume |
@greghawk for now you have to pass in your own I'll add to this that I don't think this should be solved by |
I'm implementing it as we speak for expiry-map as it was reported as an issue over there as well. Because I also need it for expiry-set, I'm looking in extracting the logic in a separate package. Still have some cleanup work to do and then actually extracting and releasing it as a package. But I believe it can easily be used by |
I implemented this in #19. Feel free to help testing and reviewing it. |
Commit da4e439 resolved memory leaking issues by introducing a dependency that was not compatible with Node.js v4 which mem v1 supported. This commit adds timers for ensuring the cache Map is cleaned up without using additional dependencies. Bug ref: sindresorhus#14
Commit da4e439 resolved memory leaking issues by introducing a dependency that was not compatible with Node.js v4 which mem v1 supported. This commit adds timers for ensuring the cache Map is cleaned up without using additional dependencies. Bug ref: sindresorhus#14
Looking at the code it seems like old results are never removed from the cache, even when they reach their maxAge and become forever unused. I might be misreading it though.
The text was updated successfully, but these errors were encountered: