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

Function updateUserSettingCache

model/user_cache.go:252–257  ·  view source on GitHub ↗
(userId int, setting string)

Source from the content-addressed store, hash-verified

250}
251
252func updateUserSettingCache(userId int, setting string) error {
253 if !common.RedisEnabled {
254 return nil
255 }
256 return common.RedisHSetField(getUserCacheKey(userId), "Setting", setting)
257}
258
259// GetUserLanguage returns the user's language preference from cache
260// Uses the existing GetUserCache mechanism for efficiency

Callers 3

updateUserCacheFunction · 0.85
UpdateUserSettingFunction · 0.85
GetUserSettingFunction · 0.85

Calls 2

RedisHSetFieldFunction · 0.92
getUserCacheKeyFunction · 0.85

Tested by

no test coverage detected