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)
| 78 | // Quota is maintained by atomic quota delta paths and must not be overwritten |
| 79 | // by stale user snapshots from profile/settings updates. |
| 80 | func updateUserCache(user User) error { |
| 81 | if !common.RedisEnabled { |
| 82 | return nil |
| 83 | } |
| 84 | return writeUserCache(user.ToBaseUser(), false) |
| 85 | } |
| 86 | |
| 87 | // GetUserCache gets complete user cache from hash |
| 88 | func GetUserCache(userId int) (*UserBase, error) { |
no test coverage detected