-
Notifications
You must be signed in to change notification settings - Fork 392
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
Cache is not respecting the provided size #26
Comments
Can you give me some detail about how the cache is used? |
Are you sure there is only one cache created? |
Your question prompted a deep dive into this part of the code and I realized it is possible for multiple caches to be created in a particular case. I pushed out of a fix and will monitor the memory usage over the next day. I believe this is the root cause. |
The fix to ensure only one cache can ever be created has been live for a day now, and the memory usage for the cache is right at the requested 100MB. Thanks for the suggestion! |
I create a new cache with a size of 100MB and set the GC percentage as recommended in the readme to 20%.
Despite this, the cache grows like a memory leak beyond the 100MB I specified. After a few days of use, it is using ~1.2 GB, as indicated by profiling the heap. The machine has just 3 GB of memory, so this is significant.
The text was updated successfully, but these errors were encountered: