Package com.google.gerrit.server.cache
Interface CacheDef<K,V>
- All Known Subinterfaces:
PersistentCacheDef<K,
V>
public interface CacheDef<K,V>
-
Method Details
-
name
String name()Unique name for this cache.The name can be used in a binding annotation
@Named(name)
to inject the cache configured with this binding. -
configKey
String configKey()Key to use when looking up configuration for this cache.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. -
keyType
com.google.inject.TypeLiteral<K> keyType() -
valueType
com.google.inject.TypeLiteral<V> valueType() -
maximumWeight
long maximumWeight() -
expireAfterWrite
Duration expireAfterWrite() -
expireFromMemoryAfterAccess
Duration expireFromMemoryAfterAccess() -
refreshAfterWrite
Duration refreshAfterWrite() -
weigher
-
loader
-