feat: update cache #204

This commit is contained in:
CaIon
2024-04-18 20:23:06 +08:00
parent 1044dd06c7
commit dac6849603
3 changed files with 13 additions and 1 deletions
+5 -1
View File
@@ -168,7 +168,11 @@ func CacheUpdateUserQuota(id int) error {
if err != nil {
return err
}
err = common.RedisSet(fmt.Sprintf("user_quota:%d", id), fmt.Sprintf("%d", quota), time.Duration(UserId2QuotaCacheSeconds)*time.Second)
return CacheSetUserQuota(id, quota)
}
func CacheSetUserQuota(id int, quota int) error {
err := common.RedisSet(fmt.Sprintf("user_quota:%d", id), fmt.Sprintf("%d", quota), time.Duration(UserId2QuotaCacheSeconds)*time.Second)
return err
}