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
Ahh, I forgot about that one. Yes, the semantics becomes very confusing as to how quiet a method is.
For your case, the simplest workaround would probably require switching to expireAfter(Expiry). This would allow you to specify a custom strategy for determining the entry's remaining lifetime. A thread-local could capture that the duration shouldn't change and the prior value be returned. By setting the flag before the cache lookup, you could instruct your routine whether to reset the time or not.
Both following methods will reset the access time of the "key"
cache.getIfPresent("key"); cache.asMap().get("key");
We have set a duration of "expireAfterAccess", and on some special conditions, we want to get the cache, but do not reset its access time.
The text was updated successfully, but these errors were encountered: