public interface CacheWithLifetimes<K,V> extends Cache<K,V>
| Modifier and Type | Method and Description |
|---|---|
void |
put(K key,
V value,
long lifetime)
cache a key-value pair
|
void |
putAll(Map<K,V> map,
long lifetime)
cache one or more key-value pairs
|
void put(K key, V value, long lifetime)
key - key associated with valuevalue - value associated with keylifetime - lifetime in milliseconds associated with datavoid putAll(Map<K,V> map, long lifetime)
map - map containing key-value pairs to cachelifetime - lifetime in milliseconds associated with each key-value pair.
If the system supports revalidation of expired cache entries to determine if
expired entries are really obsolete, a nonpositive value indicates cached entry should
always be revalidated before being returned to clientCopyright © 2015. All rights reserved.