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