You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
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
The text was updated successfully, but these errors were encountered: