Constructor and Description |
---|
CaffeineRedisCache() |
CaffeineRedisCache(String cacheName,
CaffeineCache caffeineCache,
RedisCache redisCache) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
清空所有缓存
|
Serializable |
get(String key)
根据key获取value
|
<T> T |
get(String key,
Class<T> clazz)
根据key获取value
|
CaffeineCache |
getCaffeineCache() |
RedisCache |
getRedisCache() |
Collection<String> |
keys()
获取所有的key
|
void |
put(String key,
Serializable value)
将key value保存到缓存中
|
void |
putL2Async(String key,
Serializable value) |
void |
putTemporary(String key,
Serializable value)
临时添加一个值,用于防止缓存穿透攻击
|
void |
remove(String key)
删除一个key
|
public CaffeineRedisCache()
public CaffeineRedisCache(String cacheName, CaffeineCache caffeineCache, RedisCache redisCache)
caffeineCache
- redisCache
- public void clear()
ICache
public Serializable get(String key)
ICache
public Collection<String> keys()
ICache
public void put(String key, Serializable value)
ICache
public void putL2Async(String key, Serializable value)
putL2Async
in interface IL2Cache
public void putTemporary(String key, Serializable value)
ICache
putTemporary
in interface ICache
public <T> T get(String key, Class<T> clazz)
ICache
public CaffeineCache getCaffeineCache()
public RedisCache getRedisCache()
Copyright © 2018. All rights reserved.