Package waffle.util.cache
Class CaffeineCache<K,V>
java.lang.Object
waffle.util.cache.CaffeineCache<K,V>
- Type Parameters:
K
- the type of keys maintained by this cacheV
- the type of mapped values
- All Implemented Interfaces:
Cache<K,
V>
A
Cache
based on Cache
.-
Constructor Summary
ConstructorDescriptionCaffeineCache
(@org.checkerframework.checker.index.qual.NonNegative long timeout) Instantiate new caffeine cache with timeout. -
Method Summary
-
Constructor Details
-
CaffeineCache
public CaffeineCache(@org.checkerframework.checker.index.qual.NonNegative long timeout) Instantiate new caffeine cache with timeout.- Parameters:
timeout
- Specified timeout in seconds for cache.
-
-
Method Details
-
get
Description copied from interface:Cache
Fetches the key from the cache. -
put
Description copied from interface:Cache
Stores a binding for the key and the value in the cache. -
remove
Description copied from interface:Cache
Removes the binding for the key from the cache. -
size
public int size()Description copied from interface:Cache
Returns the number of bindings in this cache.
-