public class LastModifiedCache<K, V> extends java.lang.Object implements com.github.benmanes.caffeine.cache.Cache
A delegating caffeine-based cache that checks for last modified time of the key before using the delegate cache.
Constructor and description |
---|
LastModifiedCache
(java.util.function.Function<K, java.nio.file.Path> pathProvider, com.github.benmanes.caffeine.cache.Caffeine<java.lang.Object, java.lang.Object> cacheConfig)
|
Type Params | Return Type | Name and description |
---|---|---|
|
public java.util.concurrent.ConcurrentMap<K, V> |
asMap() |
|
public void |
cleanUp() |
|
public long |
estimatedSize() |
|
public V |
get(K key, java.util.function.Function<? super K, ? extends V> mappingFunction) |
|
public java.util.Map<K, V> |
getAllPresent(java.lang.Iterable<?> keys) |
|
public V |
getIfPresent(java.lang.Object key) |
|
public void |
invalidate(java.lang.Object key) |
|
public void |
invalidateAll(java.lang.Iterable<?> keys) |
|
public void |
invalidateAll() |
|
public void |
invalidateIfModified(K key) |
|
public com.github.benmanes.caffeine.cache.Policy<K, V> |
policy() |
|
public void |
put(K key, V value) |
|
public void |
putAll(java.util.Map<? extends K, ? extends V> map) |
|
public com.github.benmanes.caffeine.cache.stats.CacheStats |
stats() |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
pathProvider
- how to get a java.nio.file.Path for a KcacheConfig
- configuration of delegate cache