New functions for individual field updates
(userId int, status bool)
| 179 | |
| 180 | // New functions for individual field updates |
| 181 | func updateUserStatusCache(userId int, status bool) error { |
| 182 | if !common.RedisEnabled { |
| 183 | return nil |
| 184 | } |
| 185 | statusInt := common.UserStatusEnabled |
| 186 | if !status { |
| 187 | statusInt = common.UserStatusDisabled |
| 188 | } |
| 189 | return common.RedisHSetField(getUserCacheKey(userId), "Status", fmt.Sprintf("%d", statusInt)) |
| 190 | } |
| 191 | |
| 192 | func updateUserQuotaCache(userId int, quota int) error { |
| 193 | if !common.RedisEnabled { |
nothing calls this directly
no test coverage detected