mongodb基础操作方法增加redis缓存策略
This commit is contained in:
@@ -232,6 +232,11 @@ func cleanRedis(ctx context.Context, tenantId interface{}, collection string) (e
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
oneKey := fmt.Sprintf(consts.One, tenantId, collection)
|
||||||
|
_, err = redis.RedisClient.Del(ctx, oneKey)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user