Skip to content
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

Default LRU cache does not always guarantee to limit the size under maximum #3507

Closed
xiaoyao1991 opened this issue Sep 25, 2016 · 0 comments
Closed
Assignees
Labels

Comments

@xiaoyao1991
Copy link
Member

It looks to me that the default LRU MapCache does not always guarantee to limit the cache size under the preset cache size maximum limit.

Currently, the cache eviction happens when a new cache entry is inserted and the insertion cause the cache size to exceed its maximum. In this case, the cache would remove only 1 entry(the least recently used) from the existing map. However, it doesn't check if the cache size is below maximum after removal. This can cause cache size to grow slowly to an unexpected number under some designated workload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants