public interface CacheDef<K,V>
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
configKey()
Key to use when looking up configuration for this cache.
|
java.time.Duration |
expireAfterWrite() |
java.time.Duration |
expireFromMemoryAfterAccess() |
com.google.inject.TypeLiteral<K> |
keyType() |
com.google.common.cache.CacheLoader<K,V> |
loader() |
long |
maximumWeight() |
java.lang.String |
name()
Unique name for this cache.
|
com.google.inject.TypeLiteral<V> |
valueType() |
com.google.common.cache.Weigher<K,V> |
weigher() |
java.lang.String name()
The name can be used in a binding annotation @Named(name) to inject the cache
configured with this binding.
java.lang.String configKey()
Typically, this will match the result of name(), so that configuration is keyed by
the actual cache name. However, it may be changed, for example to reuse the size limits of some
other cache.
com.google.inject.TypeLiteral<K> keyType()
com.google.inject.TypeLiteral<V> valueType()
long maximumWeight()
java.time.Duration expireAfterWrite()
java.time.Duration expireFromMemoryAfterAccess()