public class CaffeineCacheConfiguration extends CacheConfiguration
DefaultSyncCache.charset, DEFAULT_RECORD_STATS, DEFAULT_TESTMODE, PREFIX| Constructor and Description |
|---|
CaffeineCacheConfiguration(String cacheName,
io.micronaut.runtime.ApplicationConfiguration applicationConfiguration)
Creates a new cache with the given name.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isListenToEvictions()
If a removal listener is defined and this property is true then caffeine will send eviction events to that listener.
|
boolean |
isListenToRemovals()
If a removal listener is defined and this property is true then caffeine will send removal events to that listener.
|
void |
setListenToEvictions(boolean listenToEvictions) |
void |
setListenToRemovals(boolean listenToRemovals) |
getCacheName, getCharset, getExpireAfterAccess, getExpireAfterWrite, getInitialCapacity, getMaximumSize, getMaximumWeight, isRecordStats, isTestMode, setCharset, setExpireAfterAccess, setExpireAfterWrite, setInitialCapacity, setMaximumSize, setMaximumWeight, setRecordStats, setTestModepublic CaffeineCacheConfiguration(@Parameter
String cacheName,
io.micronaut.runtime.ApplicationConfiguration applicationConfiguration)
cacheName - Name or key of the cacheapplicationConfiguration - The common application configurationpublic boolean isListenToRemovals()
public void setListenToRemovals(boolean listenToRemovals)
listenToRemovals - The listen to removals flag.public boolean isListenToEvictions()
public void setListenToEvictions(boolean listenToEvictions)
listenToEvictions - The listen to evictions flag.