mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-09 02:03:42 +08:00
fix: update cache immediately after cache get
Co-authored-by: chikasaki <1347283135@qq.com> Co-authored-by: Cruel <157922018@qq.com>
This commit is contained in:
@@ -61,3 +61,8 @@ func RedisDel(key string) error {
|
||||
ctx := context.Background()
|
||||
return RDB.Del(ctx, key).Err()
|
||||
}
|
||||
|
||||
func RedisDecrease(key string, value int64) error {
|
||||
ctx := context.Background()
|
||||
return RDB.DecrBy(ctx, key, value).Err()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user