feat: local cache

This commit is contained in:
withchao
2024-01-12 15:41:05 +08:00
parent 006e4a1e93
commit 45064ae5ca
28 changed files with 268 additions and 386 deletions
+4 -4
View File
@@ -1,15 +1,15 @@
package cachekey
const (
blackIDsKey = "BLACK_IDS:"
isBlackKey = "IS_BLACK:"
BlackIDsKey = "BLACK_IDS:"
IsBlackKey = "IS_BLACK:" // local cache
)
func GetBlackIDsKey(ownerUserID string) string {
return blackIDsKey + ownerUserID
return BlackIDsKey + ownerUserID
}
func GetIsBlackIDsKey(possibleBlackUserID, userID string) string {
return isBlackKey + userID + "-" + possibleBlackUserID
return IsBlackKey + userID + "-" + possibleBlackUserID
}