类 CaffeineRedisCache
java.lang.Object
org.tio.utils.cache.AbsCache
org.tio.utils.cache.caffeineredis.CaffeineRedisCache
- 所有已实现的接口:
ICache
- 作者:
- tanyaowu 2017年8月12日 下午9:13:54
-
嵌套类概要
从接口继承的嵌套类/接口 org.tio.utils.cache.ICache
ICache.NullClass -
字段概要
字段修饰符和类型字段说明static final Stringstatic Map<String,CaffeineRedisCache> static org.redisson.api.RTopic从接口继承的字段 org.tio.utils.cache.ICache
MAX_EXPIRE_IN_LOCAL, NULL_OBJ -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidclear()清空所有缓存static CaffeineRedisCachestatic CaffeineRedisCachekeys()获取所有的keyvoidput(String key, Serializable value) 将key value保存到缓存中voidputTemporary(String key, Serializable value) 临时添加一个值,用于防止缓存穿透攻击static CaffeineRedisCacheregister(org.redisson.api.RedissonClient redisson, String cacheName, Long timeToLiveSeconds, Long timeToIdleSeconds) void删除一个keylong对象还会存活多久。从类继承的方法 org.tio.utils.cache.AbsCache
get, get, getCacheName, getTimeToIdleSeconds, getTimeToLiveSeconds, setCacheName, setTimeToIdleSeconds, setTimeToLiveSeconds
-
字段详细资料
-
CACHE_CHANGE_TOPIC
- 另请参阅:
-
map
-
topic
public static org.redisson.api.RTopic topic
-
-
构造器详细资料
-
CaffeineRedisCache
- 参数:
localCache-distCache-
-
-
方法详细资料
-
getCache
-
getCache
-
register
public static CaffeineRedisCache register(org.redisson.api.RedissonClient redisson, String cacheName, Long timeToLiveSeconds, Long timeToIdleSeconds) -
clear
public void clear()从接口复制的说明:ICache清空所有缓存 -
_get
-
keys
从接口复制的说明:ICache获取所有的key- 返回:
-
put
从接口复制的说明:ICache将key value保存到缓存中- 参数:
key-value-
-
putTemporary
从接口复制的说明:ICache临时添加一个值,用于防止缓存穿透攻击 -
remove
从接口复制的说明:ICache删除一个key- 参数:
key-
-
ttl
从接口复制的说明:ICache对象还会存活多久。- 返回:
- currTime in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-