public class CacheHolder<K,V>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Optional<com.github.benmanes.caffeine.cache.Cache<K,V>> |
cache |
Modifier | Constructor and Description |
---|---|
protected |
CacheHolder(com.github.benmanes.caffeine.cache.Cache<K,V> c)
Holds a nullable cache on some key-values
|
Modifier and Type | Method and Description |
---|---|
V |
getIfPresent(K k) |
void |
invalidate(K key) |
static <K,V> CacheHolder<K,V> |
of(com.github.benmanes.caffeine.cache.Cache<K,V> c) |
void |
put(K k,
V v) |
java.lang.String |
toString() |
public static <K,V> CacheHolder<K,V> of(com.github.benmanes.caffeine.cache.Cache<K,V> c)
public void invalidate(K key)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2021. All Rights Reserved.