MCPcopy Create free account
hub / github.com/QuantumNous/new-api / InvalidateUserCache

Function InvalidateUserCache

model/user_cache.go:72–74  ·  view source on GitHub ↗

InvalidateUserCache is the exported version of invalidateUserCache. 供 controller 等上层包在用户状态变更(如禁用、删除、角色变更)后主动清理缓存。

(userId int)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

invalidateUserCacheFunction · 0.85

Tested by

no test coverage detected