This commit is contained in:
kzkzzzz
2024-06-01 18:28:09 +08:00
parent 0b36406c6f
commit 7fe58f3725
4 changed files with 6 additions and 6 deletions

View File

@@ -169,11 +169,11 @@ func (r *MyRedis) SetJson(key string, value interface{}, t ...time.Duration) (st
return r.Client.Set(ctx, key, v, t2).Result()
}
func CloseInstance(key string) {
func CloseDB(key string) {
DB(key).Client.Close()
}
func CloseAllInstance() {
func CloseAllDB() {
for _, v := range instanceMap {
v.Client.Close()
}