| Constructor and Description |
|---|
RedisCache(redis.clients.jedis.JedisPool jedisPool) |
RedisCache(redis.clients.jedis.JedisPool jedisPool,
BaseSerializer serializer) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
清空缓存信息
|
Map<String,Object> |
read(Collection<String> keys)
从缓存中获得一组对象信息
|
Object |
read(String key)
从缓存中获得对象
|
void |
remove(String... keys)
从缓存中移除对象
|
void |
tearDown() |
void |
write(Map<String,Object> keyValueMap,
long expire)
将对象加入到缓存,使用指定失效时长
|
void |
write(String key,
Object value,
long expire)
将对象加入到缓存,使用指定失效时长
|
public RedisCache(redis.clients.jedis.JedisPool jedisPool)
public RedisCache(redis.clients.jedis.JedisPool jedisPool,
BaseSerializer serializer)
public Object read(String key)
Cacheread in interface Cachekey - 键Cache.read(String)public void write(String key, Object value, long expire)
Cachewrite in interface Cachekey - 键value - 缓存的对象expire - 失效时长,单位毫秒Cache.write(String, Object, long)public Map<String,Object> read(Collection<String> keys)
Cachepublic void write(Map<String,Object> keyValueMap, long expire)
Cachewrite in interface CachekeyValueMap - 缓存的对象expire - 失效时长,单位毫秒Cache.write(Map, long)public void clear()
Cache@PreDestroy public void tearDown()
Copyright © 2019. All rights reserved.