类 AbstractStringRedisCache
java.lang.Object
cn.herodotus.engine.cache.redis.definition.AbstractStringRedisCache
- 所有已实现的接口:
StringRedisCache,org.springframework.beans.factory.InitializingBean
Description: SimpleRedisCache的基础实现
增加这一层是为了方便扩展,比如说支持JustAuth- 作者:
- : gengwei.zheng
- Date:
- : 2021/5/21 23:45
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void存入缓存void存入缓存booleancontainsKey(String key) 是否存在key,如果对应key的value值已过期,也返回falseboolean获取缓存内容voidsetDefaultTimeout(long defaultTimeout) voidvoidsetStringRedisTemplate(org.springframework.data.redis.core.StringRedisTemplate stringRedisTemplate) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.springframework.beans.factory.InitializingBean
afterPropertiesSet
-
构造器详细资料
-
AbstractStringRedisCache
public AbstractStringRedisCache()
-
-
方法详细资料
-
setStringRedisTemplate
public void setStringRedisTemplate(org.springframework.data.redis.core.StringRedisTemplate stringRedisTemplate) -
setPrefix
-
setDefaultTimeout
public void setDefaultTimeout(long defaultTimeout) -
cache
从接口复制的说明:StringRedisCache存入缓存- 指定者:
cache在接口中StringRedisCache- 参数:
key- 缓存keyvalue- 缓存内容
-
cache
存入缓存- 指定者:
cache在接口中StringRedisCache- 参数:
key- 缓存keyvalue- 缓存内容timeout- 指定缓存过期时间(毫秒)
-
get
获取缓存内容- 指定者:
get在接口中StringRedisCache- 参数:
key- 缓存key- 返回:
- 缓存内容
-
containsKey
是否存在key,如果对应key的value值已过期,也返回false- 指定者:
containsKey在接口中StringRedisCache- 参数:
key- 缓存key- 返回:
- true:存在key,并且value没过期;false:key不存在或者已过期
-
delete
- 指定者:
delete在接口中StringRedisCache
-