-
Notifications
You must be signed in to change notification settings - Fork 106
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
LRU Size growth #24
Comments
Hmm, it sounds like there may be some bug if the size of the cache is 1M but the iterator returned 4.9M records. Would you happen to be able to share the code to reproduce the bug so I can take a look myself? In regards to your other questions:
Yes, if you specify a size for the cache in the constructor then it should never contain more than that many elements.
No, expired records are dropped and so they are not available to be returned by the iterator.
The iteration is done in order from the most recently used element to the least recently used element. |
As @ssloboda noted in #29, he found and fixed a bug in |
I created a Lru instance with size of 1M and set 5M records. I was able to dump 4.9M+ keys using iterators.
The text was updated successfully, but these errors were encountered: