public class CaffeineCacheWrap
extends org.springframework.cache.caffeine.CaffeineCache
null 值转换为
NullValue.INSTANCE 放进缓存中,这样后续的操作就不会进入到缓存中| Constructor and Description |
|---|
CaffeineCacheWrap(String name,
com.github.benmanes.caffeine.cache.Cache<Object,Object> cache)
Create a
Cache instance with
the specified name and the given internal
Cache to use. |
CaffeineCacheWrap(String name,
com.github.benmanes.caffeine.cache.Cache<Object,Object> cache,
boolean allowNullValues)
Create a
Cache instance with
the specified name and the given internal
Cache to use. |
| Modifier and Type | Method and Description |
|---|---|
void |
put(Object key,
Object value) |
clear, evict, evictIfPresent, get, get, getName, getNativeCache, invalidate, lookup, putIfAbsentpublic CaffeineCacheWrap(String name, com.github.benmanes.caffeine.cache.Cache<Object,Object> cache)
Cache instance with
the specified name and the given internal
Cache to use.name - the name of the cachecache - the backing Caffeine Cache instancepublic CaffeineCacheWrap(String name, com.github.benmanes.caffeine.cache.Cache<Object,Object> cache, boolean allowNullValues)
Cache instance with
the specified name and the given internal
Cache to use.name - the name of the cachecache - the backing Caffeine Cache instanceallowNullValues - whether to accept and convert null values
for this cacheCopyright © 2018–2020. All rights reserved.