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
{{ message }}
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.
Environment Details
Describe the bug
Given a cache with an
CreatedExpiryPolicy
, read-through enabled and with a cache loader.Cache is always just accessed via
get(K key)
method.Initially cache accesses work fine.
As soon as the cache item has expired the following happens once (in
Cache$Default#getValue
):loadCacheEntry
is called to provide a new value ✅expiryForCreation
is calculated based on the old item's creation time, hence it immediately is expired again ❓value
(returned from the loader) is then overriden to null ❓Why is this? I see this was introduced by #369, which unfortunately has no (or just private) description.
Subsequent calls to get work fine again, since the old entry was removed and hence next call will just establish a new one.
To Reproduce
Given the following cache configuration
Then
get("whatever")
... wait for the expiry period to have passed ... thenget("whatever")
again.Expected behavior
Should return the actual value from the loader.
The text was updated successfully, but these errors were encountered: