类 RedisHashCache
java.lang.Object
net.oschina.j2cache.redis.RedisHashCache
- 所有已实现的接口:
Cache,Level2Cache
Redis 缓存操作封装,基于 Hashs 实现多个 Region 的缓存
- 作者:
- wendal, Winter Lau(javayou@gmail.com) 重要提示!!! hash 存储模式无法单独对 key 设置 expire
-
构造器详细资料
-
RedisHashCache
缓存构造- 参数:
namespace- 命名空间,用于在多个实例中避免 key 的重叠region- 缓存区域的名称client- 缓存客户端接口
-
-
方法详细资料
-
getBytes
从接口复制的说明:Level2Cache读取缓存数据字节数组- 指定者:
getBytes在接口中Level2Cache- 参数:
key- cache key- 返回:
- cache data
-
getBytes
从接口复制的说明:Level2Cache同时读取多个 Key- 指定者:
getBytes在接口中Level2Cache- 参数:
keys- multiple cache key- 返回:
- cache values
-
setBytes
从接口复制的说明:Level2Cache设置缓存数据字节数组- 指定者:
setBytes在接口中Level2Cache- 参数:
key- cache keybytes- cache data
-
setBytes
从接口复制的说明:Level2Cache同时设置多个数据- 指定者:
setBytes在接口中Level2Cache- 参数:
bytes- cache data
-
exists
从接口复制的说明:Level2Cache判断缓存数据是否存在- 指定者:
exists在接口中Cache- 指定者:
exists在接口中Level2Cache- 参数:
key- cache key- 返回:
- true if cache key exists in redis
-
evict
从接口复制的说明:Level2CacheRemove items from the cache- 指定者:
evict在接口中Cache- 指定者:
evict在接口中Level2Cache- 参数:
keys- Cache key
-
keys
从接口复制的说明:Level2CacheReturn all keys- 指定者:
keys在接口中Cache- 指定者:
keys在接口中Level2Cache- 返回:
- 返回键的集合
-
clear
public void clear()从接口复制的说明:Level2CacheClear the cache- 指定者:
clear在接口中Cache- 指定者:
clear在接口中Level2Cache
-