Package waffle.util.cache
Class CaffeineCacheSupplier
- java.lang.Object
-
- waffle.util.cache.CaffeineCacheSupplier
-
- All Implemented Interfaces:
CacheSupplier
public class CaffeineCacheSupplier extends Object implements CacheSupplier
ACacheSuppliersupplyingCaffeineCache.- Author:
- Simon Legner
-
-
Constructor Summary
Constructors Constructor Description CaffeineCacheSupplier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <K,V>
Cache<K,V>newCache(long timeout)Creates a new cache with the specified timeout
-
-
-
Method Detail
-
newCache
public <K,V> Cache<K,V> newCache(long timeout)
Description copied from interface:CacheSupplierCreates a new cache with the specified timeout- Specified by:
newCachein interfaceCacheSupplier- Type Parameters:
K- the type of keys maintained by this cacheV- the type of mapped values- Parameters:
timeout- timeout in seconds- Returns:
- a new cache
-
-