mongodb基础操作方法增加redis缓存策略

This commit is contained in:
2025-12-04 17:38:34 +08:00
parent 3f4ac12f52
commit 25452e04b7
3 changed files with 159 additions and 3 deletions

7
consts/redis_key.go Normal file
View File

@@ -0,0 +1,7 @@
package consts
const CleanList = "list:tenantId-%v:collection-%s:*"
const CleanCount = "count:tenantId-%v:collection-%s:*"
const List = "list:tenantId-%v:collection-%s:filter:%s:options:%s"
const Count = "count:tenantId-%v:collection-%s:filter:%s"
const One = "one:tenantId-%v:collection-%s:filter:%s:*"