MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / updateUserStatusCache

Function updateUserStatusCache

model/user_cache.go:181–190  ·  view source on GitHub ↗

New functions for individual field updates

(userId int, status bool)

Source from the content-addressed store, hash-verified

179
180// New functions for individual field updates
181func updateUserStatusCache(userId int, status bool) error {
182 if !common.RedisEnabled {
183 return nil
184 }
185 statusInt := common.UserStatusEnabled
186 if !status {
187 statusInt = common.UserStatusDisabled
188 }
189 return common.RedisHSetField(getUserCacheKey(userId), "Status", fmt.Sprintf("%d", statusInt))
190}
191
192func updateUserQuotaCache(userId int, quota int) error {
193 if !common.RedisEnabled {

Callers

nothing calls this directly

Calls 2

RedisHSetFieldFunction · 0.92
getUserCacheKeyFunction · 0.85

Tested by

no test coverage detected