public class RedisStateCache extends Object implements AuthStateCache
Redis作为JustAuth的State的缓存
| 限定符和类型 | 字段和说明 |
|---|---|
private CacheProperties |
cacheProperties |
private org.springframework.data.redis.core.RedisTemplate<String,String> |
redisTemplate |
| 构造器和说明 |
|---|
RedisStateCache() |
private final org.springframework.data.redis.core.RedisTemplate<String,String> redisTemplate
private final CacheProperties cacheProperties
public void cache(String key, String value)
cache 在接口中 AuthStateCachekey - 缓存keyvalue - 缓存内容public void cache(String key, String value, long timeout)
cache 在接口中 AuthStateCachekey - 缓存keyvalue - 缓存内容timeout - 指定缓存过期时间(毫秒)public String get(String key)
get 在接口中 AuthStateCachekey - 缓存keypublic boolean containsKey(String key)
containsKey 在接口中 AuthStateCachekey - 缓存keyCopyright © 2023. All rights reserved.