feat: token缓存逻辑更新(实验性)
This commit is contained in:
1 parent
d238aaeaa1
commit
a2873b6d67
4 files changed
+85
-20
No files matched your search
@@ -57,6 +57,11 @@ func RedisGet(key string) (string, error) {
|
||||
return RDB.Get(ctx, key).Result()
|
||||
}
|
||||
|
||||
func RedisGetEx(key string, expiration time.Duration) (string, error) {
|
||||
ctx := context.Background()
|
||||
return RDB.GetSet(ctx, key, expiration).Result()
|
||||
}
|
||||
|
||||
func RedisDel(key string) error {
|
||||
ctx := context.Background()
|
||||
return RDB.Del(ctx, key).Err()
|
||||
|
||||
Reference in new issue
Block a user