refactor: token cache logic

This commit is contained in:
CalciumIon
2024-12-30 17:10:48 +08:00
parent c6ae827385
commit aefd53b683
15 changed files with 417 additions and 196 deletions
+6 -1
View File
@@ -9,10 +9,15 @@ var (
UserId2StatusCacheSeconds = common.SyncFrequency
)
// Cache keys
const (
// Cache keys
UserGroupKeyFmt = "user_group:%d"
UserQuotaKeyFmt = "user_quota:%d"
UserEnabledKeyFmt = "user_enabled:%d"
UserUsernameKeyFmt = "user_name:%d"
)
const (
TokenFiledRemainQuota = "RemainQuota"
TokenFieldGroup = "Group"
)