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
I've been experiencing unexpected behavior with MutableTTLCache not actually evicting expired keys. It seems it only checks for expiration every 1000 puts. I suppose this probably makes sense under certain circumstances, but it isn't documented or configurable.
The text was updated successfully, but these errors were encountered:
Actually, I'm realizing that the line linked to above isn't exactly the source of my problem. My key's aren't being evicted on time, but it doesn't have to do with the put behavior. I'm making reads after the configured expiration time, but I'm not seeing the memoized function being invoked.
Upon further investigation, the problem is that calling the memoized function performs its lookup though hit, which does no expiration checking, unlike get. Is this an oversight? Why does hit exist? Interestingly, hit unconditionally attempts a put, but as mentioned above, pruning only happens every thousandth time.
I've been experiencing unexpected behavior with MutableTTLCache not actually evicting expired keys. It seems it only checks for expiration every 1000 puts. I suppose this probably makes sense under certain circumstances, but it isn't documented or configurable.
The text was updated successfully, but these errors were encountered: