MCPcopy
hub / github.com/QuantumNous/new-api / updateUserSettingCache

Function updateUserSettingCache

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

Source from the content-addressed store, hash-verified

222}
223
224func updateUserSettingCache(userId int, setting string) error {
225 if !common.RedisEnabled {
226 return nil
227 }
228 return common.RedisHSetField(getUserCacheKey(userId), "Setting", setting)
229}
230
231// GetUserLanguage returns the user's language preference from cache
232// Uses the existing GetUserCache mechanism for efficiency

Callers 1

GetUserSettingFunction · 0.85

Calls 2

RedisHSetFieldFunction · 0.92
getUserCacheKeyFunction · 0.85

Tested by

no test coverage detected