public interface ExpiryTimeValues
ResiliencePolicy and ExpiryPolicy
as well as Cache.expireAt(Object, long).
Users may want to use the class Expiry with additional utility methods as
alternative.
ExpiryPolicy,
ResiliencePolicy,
Cache.expireAt(K, long),
Expiry| Modifier and Type | Field and Description |
|---|---|
static long |
ETERNAL
Return value signalling to keep the value forever in the cache, switching off expiry.
|
static long |
NEUTRAL
Don't change the expiry of the entry.
|
static long |
NO_CACHE
Value should not be cached.
|
static long |
NOW
Identical to
NO_CACHE. |
static long |
REFRESH
An immediate load is triggered if refreshAhead is enabled.
|
static final long NEUTRAL
static final long NO_CACHE
static final long NOW
NO_CACHE. More meaningful when used together with
Cache.expireAt(K, long). The value expires immediately. An immediate
load is triggered if refreshAhead is enabled.static final long REFRESH
After the load operation is completed, the entry is in a special area and not accessible
by direct cache operations, meaning containsKey returns false. After an operation which
would regularly trigger a load (e.g. get or loadAll), the entry is present in the cache.
static final long ETERNAL
cache2k API documentation. Copyright © 2000–2019 headissue GmbH, Munich.