diff --git a/resource/redisCli/util.go b/resource/redisCli/util.go index ded2242a050035e116f5b48310b071652c20fed2..b6b4f8092bf14194d556af63dcb375ab70ca7ae8 100644 --- a/resource/redisCli/util.go +++ b/resource/redisCli/util.go @@ -65,3 +65,12 @@ func IncrNumExpire(key string, num int64, expiration time.Duration) (int64, erro } return times, nil } + +func DelCache(key string) error { + err := RedisClient.Del(context.Background(), key).Err() + if err != nil { + mylogrus.MyLog.Errorf("DelCache key:%s, err:%s", key, err) + return err + } + return nil +}