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

MutableTTLCache.hit should call get(k) instead of backingCache.get #243

Open
aschwager opened this issue Nov 18, 2014 · 0 comments
Open

Comments

@aschwager
Copy link

When implementing a ReadableStore.withCache(someStore, MutableTTLCache) I noticed that entries were not properly expiring and traced the issue back to this line. Calling hit(k) on the MutableTTLCache seems to call directly into the backing cache (in this case a JLinkedHashMap) and does not apply any of the ttl-ness filtering found in MutableTTLCache.get. Hit then calls +=, which adds the entry back to the cache with a new TTL

@aschwager aschwager changed the title MutableCache.getOrElseUpdate should call get(k) instead of hit(k) MutableTTLCache.hit should call get(k) instead of backingCache.get Nov 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant