MCPcopy
hub / github.com/justauth/JustAuth / AuthCache

Interface AuthCache

src/main/java/me/zhyd/oauth/cache/AuthCache.java:9–50  ·  view source on GitHub ↗

JustAuth缓存,用来缓存State @author yadong.zhang (yadong.zhang0415(a)gmail.com) @since 1.9.3

Source from the content-addressed store, hash-verified

7 * @since 1.9.3
8 */
9public interface AuthCache {
10
11 /**
12 * 设置缓存
13 *
14 * @param key 缓存KEY
15 * @param value 缓存内容
16 */
17 void set(String key, String value);
18
19 /**
20 * 设置缓存,指定过期时间
21 *
22 * @param key 缓存KEY
23 * @param value 缓存内容
24 * @param timeout 指定缓存过期时间(毫秒)
25 */
26 void set(String key, String value, long timeout);
27
28 /**
29 * 获取缓存
30 *
31 * @param key 缓存KEY
32 * @return 缓存内容
33 */
34 String get(String key);
35
36 /**
37 * 是否存在key,如果对应key的value值已过期,也返回false
38 *
39 * @param key 缓存KEY
40 * @return true:存在key,并且value没过期;false:key不存在或者已过期
41 */
42 boolean containsKey(String key);
43
44 /**
45 * 清理过期的缓存
46 */
47 default void pruneCache() {
48 }
49
50}

Callers 17

cacheMethod · 0.65
cache1Method · 0.65
cache2Method · 0.65
getMethod · 0.65
getMethod · 0.65
containsKeyMethod · 0.65
getMethod · 0.65
doGetUserInfoMethod · 0.65
containsKeyMethod · 0.65
checkStateMethod · 0.65
checkResponseMethod · 0.65

Implementers 1

AuthDefaultCachesrc/main/java/me/zhyd/oauth/cache/Auth

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…