类 AuthStateRedisCache

java.lang.Object
org.macrocloud.kernel.social.cache.AuthStateRedisCache
所有已实现的接口:
me.zhyd.oauth.cache.AuthStateCache

public class AuthStateRedisCache extends Object implements me.zhyd.oauth.cache.AuthStateCache
扩展Redis版的state缓存
作者:
yadong.zhang, Chill
  • 构造器详细资料

    • AuthStateRedisCache

      public AuthStateRedisCache()
  • 方法详细资料

    • cache

      public void cache(String key, String value)
      存入缓存,默认3分钟
      指定者:
      cache 在接口中 me.zhyd.oauth.cache.AuthStateCache
      参数:
      key - 缓存key
      value - 缓存内容
    • cache

      public void cache(String key, String value, long timeout)
      存入缓存
      指定者:
      cache 在接口中 me.zhyd.oauth.cache.AuthStateCache
      参数:
      key - 缓存key
      value - 缓存内容
      timeout - 指定缓存过期时间(毫秒)
    • get

      public String get(String key)
      获取缓存内容
      指定者:
      get 在接口中 me.zhyd.oauth.cache.AuthStateCache
      参数:
      key - 缓存key
      返回:
      缓存内容
    • containsKey

      public boolean containsKey(String key)
      是否存在key,如果对应key的value值已过期,也返回false
      指定者:
      containsKey 在接口中 me.zhyd.oauth.cache.AuthStateCache
      参数:
      key - 缓存key
      返回:
      true:存在key,并且value没过期;false:key不存在或者已过期