InvalidateUserCache is the exported version of invalidateUserCache. 供 controller 等上层包在用户状态变更(如禁用、删除、角色变更)后主动清理缓存。
(userId int)
| 70 | // InvalidateUserCache is the exported version of invalidateUserCache. |
| 71 | // 供 controller 等上层包在用户状态变更(如禁用、删除、角色变更)后主动清理缓存。 |
| 72 | func InvalidateUserCache(userId int) error { |
| 73 | return invalidateUserCache(userId) |
| 74 | } |
| 75 | |
| 76 | func populateUserCache(user User) error { |
| 77 | if !common.RedisEnabled { |
nothing calls this directly
no test coverage detected