MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / GetSetting

Method GetSetting

internal/op/cache.go:107–114  ·  view source on GitHub ↗

cached setting

(key string)

Source from the content-addressed store, hash-verified

105
106// cached setting
107func (cm *CacheManager) GetSetting(key string) (*model.SettingItem, bool) {
108 if data, exists := cm.settingCache.Get(key); exists {
109 if setting, ok := data.(*model.SettingItem); ok {
110 return setting, true
111 }
112 }
113 return nil, false
114}
115
116// cache setting groups
117func (cm *CacheManager) SetSettingGroup(key string, settings []model.SettingItem) {

Callers 1

GetSettingItemByKeyFunction · 0.80

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected