updateUserCache refreshes non-quota user cache fields. Quota is maintained by atomic quota delta paths and must not be overwritten by stale user snapshots from profile/settings updates.
(user User)
| 84 | // Quota is maintained by atomic quota delta paths and must not be overwritten |
| 85 | // by stale user snapshots from profile/settings updates. |
| 86 | func updateUserCache(user User) error { |
| 87 | if !common.RedisEnabled { |
| 88 | return nil |
| 89 | } |
| 90 | return writeUserCache(user.ToBaseUser(), false) |
| 91 | } |
| 92 | |
| 93 | // GetUserCache gets complete user cache from hash |
| 94 | func GetUserCache(userId int) (*UserBase, error) { |
no test coverage detected