We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59e6b0f commit dab36d8Copy full SHA for dab36d8
src/config/redis.ts renamed to src/config/Rediss.ts
@@ -25,14 +25,39 @@ client.on('error', function (err) {
25
})
26
27
class Redis {
28
+ /**
29
+ *
30
+ * @param key
31
+ * @param data
32
+ */
33
public static set(key: string, data: any[]) {
34
client.setex(key, 86400, JSON.stringify(data))
35
}
36
37
38
39
40
+ * @example
41
+ * // get('get-role')
42
43
public static get(key: string) {
44
client.get(key)
45
46
47
48
49
+ * @param key get all by key return array
50
51
+ * // keys.('get-role:*')
52
53
+ public static keys(key: string) {
54
+ client.keys(key)
55
+ }
56
+
57
58
59
60
61
public static del(key: string) {
62
client.del(key)
63
0 commit comments