public interface CacheBinding<K,V>
CacheModule
instance.Modifier and Type | Method and Description |
---|---|
CacheBinding<K,V> |
configKey(java.lang.String configKey)
Set the config name to something other than the cache name.
|
CacheBinding<K,V> |
expireAfterWrite(java.time.Duration duration)
Set the time an element lives after last write before being expired.
|
CacheBinding<K,V> |
expireFromMemoryAfterAccess(java.time.Duration duration)
Set the time an element lives after last access before being expired.
|
CacheBinding<K,V> |
loader(java.lang.Class<? extends com.google.common.cache.CacheLoader<K,V>> clazz)
Populate the cache with items from the CacheLoader.
|
CacheBinding<K,V> |
maximumWeight(long weight)
Set the total size of the cache.
|
CacheBinding<K,V> |
weigher(java.lang.Class<? extends com.google.common.cache.Weigher<K,V>> clazz)
Algorithm to weigh an object with a method other than the unit weight 1.
|
CacheBinding<K,V> maximumWeight(long weight)
CacheBinding<K,V> expireAfterWrite(java.time.Duration duration)
CacheBinding<K,V> expireFromMemoryAfterAccess(java.time.Duration duration)
CacheBinding<K,V> loader(java.lang.Class<? extends com.google.common.cache.CacheLoader<K,V>> clazz)
CacheBinding<K,V> weigher(java.lang.Class<? extends com.google.common.cache.Weigher<K,V>> clazz)
CacheBinding<K,V> configKey(java.lang.String configKey)
CacheDef.configKey()