diff options
Diffstat (limited to 'internal/config')
-rw-r--r-- | internal/config/config.go | 16 | ||||
-rw-r--r-- | internal/config/defaults.go | 82 | ||||
-rw-r--r-- | internal/config/helpers.gen.go | 302 |
3 files changed, 367 insertions, 33 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index a1e00ea8d..ab353f32a 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -157,6 +157,10 @@ type Configuration struct { type CacheConfiguration struct { GTS GTSCacheConfiguration `name:"gts"` + + VisibilityMaxSize int `name:"visibility-max-size"` + VisibilityTTL time.Duration `name:"visibility-ttl"` + VisibilitySweepFreq time.Duration `name:"visibility-sweep-freq"` } type GTSCacheConfiguration struct { @@ -180,6 +184,14 @@ type GTSCacheConfiguration struct { EmojiCategoryTTL time.Duration `name:"emoji-category-ttl"` EmojiCategorySweepFreq time.Duration `name:"emoji-category-sweep-freq"` + FollowMaxSize int `name:"follow-max-size"` + FollowTTL time.Duration `name:"follow-ttl"` + FollowSweepFreq time.Duration `name:"follow-sweep-freq"` + + FollowRequestMaxSize int `name:"follow-request-max-size"` + FollowRequestTTL time.Duration `name:"follow-request-ttl"` + FollowRequestSweepFreq time.Duration `name:"follow-request-sweep-freq"` + MediaMaxSize int `name:"media-max-size"` MediaTTL time.Duration `name:"media-ttl"` MediaSweepFreq time.Duration `name:"media-sweep-freq"` @@ -200,6 +212,10 @@ type GTSCacheConfiguration struct { StatusTTL time.Duration `name:"status-ttl"` StatusSweepFreq time.Duration `name:"status-sweep-freq"` + StatusFaveMaxSize int `name:"status-fave-max-size"` + StatusFaveTTL time.Duration `name:"status-fave-ttl"` + StatusFaveSweepFreq time.Duration `name:"status-fave-sweep-freq"` + TombstoneMaxSize int `name:"tombstone-max-size"` TombstoneTTL time.Duration `name:"tombstone-ttl"` TombstoneSweepFreq time.Duration `name:"tombstone-sweep-freq"` diff --git a/internal/config/defaults.go b/internal/config/defaults.go index 17cc71086..999b81c65 100644 --- a/internal/config/defaults.go +++ b/internal/config/defaults.go @@ -51,7 +51,7 @@ var Defaults = Configuration{ DbSqliteJournalMode: "WAL", DbSqliteSynchronous: "NORMAL", DbSqliteCacheSize: 8 * bytesize.MiB, - DbSqliteBusyTimeout: time.Minute * 5, + DbSqliteBusyTimeout: time.Minute * 30, WebTemplateBaseDir: "./web/template/", WebAssetBaseDir: "./web/assets/", @@ -119,58 +119,74 @@ var Defaults = Configuration{ Cache: CacheConfiguration{ GTS: GTSCacheConfiguration{ - AccountMaxSize: 500, - AccountTTL: time.Minute * 5, - AccountSweepFreq: time.Second * 30, + AccountMaxSize: 2000, + AccountTTL: time.Minute * 30, + AccountSweepFreq: time.Minute, - BlockMaxSize: 100, - BlockTTL: time.Minute * 5, - BlockSweepFreq: time.Second * 30, + BlockMaxSize: 1000, + BlockTTL: time.Minute * 30, + BlockSweepFreq: time.Minute, - DomainBlockMaxSize: 1000, + DomainBlockMaxSize: 2000, DomainBlockTTL: time.Hour * 24, DomainBlockSweepFreq: time.Minute, - EmojiMaxSize: 500, - EmojiTTL: time.Minute * 5, - EmojiSweepFreq: time.Second * 30, + EmojiMaxSize: 2000, + EmojiTTL: time.Minute * 30, + EmojiSweepFreq: time.Minute, EmojiCategoryMaxSize: 100, - EmojiCategoryTTL: time.Minute * 5, - EmojiCategorySweepFreq: time.Second * 30, + EmojiCategoryTTL: time.Minute * 30, + EmojiCategorySweepFreq: time.Minute, - MediaMaxSize: 500, - MediaTTL: time.Minute * 5, - MediaSweepFreq: time.Second * 30, + FollowMaxSize: 2000, + FollowTTL: time.Minute * 30, + FollowSweepFreq: time.Minute, - MentionMaxSize: 500, - MentionTTL: time.Minute * 5, - MentionSweepFreq: time.Second * 30, + FollowRequestMaxSize: 2000, + FollowRequestTTL: time.Minute * 30, + FollowRequestSweepFreq: time.Minute, - NotificationMaxSize: 500, - NotificationTTL: time.Minute * 5, - NotificationSweepFreq: time.Second * 30, + MediaMaxSize: 1000, + MediaTTL: time.Minute * 30, + MediaSweepFreq: time.Minute, + + MentionMaxSize: 2000, + MentionTTL: time.Minute * 30, + MentionSweepFreq: time.Minute, + + NotificationMaxSize: 1000, + NotificationTTL: time.Minute * 30, + NotificationSweepFreq: time.Minute, ReportMaxSize: 100, - ReportTTL: time.Minute * 5, - ReportSweepFreq: time.Second * 30, + ReportTTL: time.Minute * 30, + ReportSweepFreq: time.Minute, - StatusMaxSize: 500, - StatusTTL: time.Minute * 5, - StatusSweepFreq: time.Second * 30, + StatusMaxSize: 2000, + StatusTTL: time.Minute * 30, + StatusSweepFreq: time.Minute, - TombstoneMaxSize: 100, - TombstoneTTL: time.Minute * 5, - TombstoneSweepFreq: time.Second * 30, + StatusFaveMaxSize: 2000, + StatusFaveTTL: time.Minute * 30, + StatusFaveSweepFreq: time.Minute, - UserMaxSize: 100, - UserTTL: time.Minute * 5, - UserSweepFreq: time.Second * 30, + TombstoneMaxSize: 500, + TombstoneTTL: time.Minute * 30, + TombstoneSweepFreq: time.Minute, + + UserMaxSize: 500, + UserTTL: time.Minute * 30, + UserSweepFreq: time.Minute, WebfingerMaxSize: 250, WebfingerTTL: time.Hour * 24, WebfingerSweepFreq: time.Minute * 15, }, + + VisibilityMaxSize: 2000, + VisibilityTTL: time.Minute * 30, + VisibilitySweepFreq: time.Minute, }, AdminMediaPruneDryRun: true, diff --git a/internal/config/helpers.gen.go b/internal/config/helpers.gen.go index 6fc195ad0..e35eb0665 100644 --- a/internal/config/helpers.gen.go +++ b/internal/config/helpers.gen.go @@ -2501,6 +2501,158 @@ func GetCacheGTSEmojiCategorySweepFreq() time.Duration { // SetCacheGTSEmojiCategorySweepFreq safely sets the value for global configuration 'Cache.GTS.EmojiCategorySweepFreq' field func SetCacheGTSEmojiCategorySweepFreq(v time.Duration) { global.SetCacheGTSEmojiCategorySweepFreq(v) } +// GetCacheGTSFollowMaxSize safely fetches the Configuration value for state's 'Cache.GTS.FollowMaxSize' field +func (st *ConfigState) GetCacheGTSFollowMaxSize() (v int) { + st.mutex.Lock() + v = st.config.Cache.GTS.FollowMaxSize + st.mutex.Unlock() + return +} + +// SetCacheGTSFollowMaxSize safely sets the Configuration value for state's 'Cache.GTS.FollowMaxSize' field +func (st *ConfigState) SetCacheGTSFollowMaxSize(v int) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.Cache.GTS.FollowMaxSize = v + st.reloadToViper() +} + +// CacheGTSFollowMaxSizeFlag returns the flag name for the 'Cache.GTS.FollowMaxSize' field +func CacheGTSFollowMaxSizeFlag() string { return "cache-gts-follow-max-size" } + +// GetCacheGTSFollowMaxSize safely fetches the value for global configuration 'Cache.GTS.FollowMaxSize' field +func GetCacheGTSFollowMaxSize() int { return global.GetCacheGTSFollowMaxSize() } + +// SetCacheGTSFollowMaxSize safely sets the value for global configuration 'Cache.GTS.FollowMaxSize' field +func SetCacheGTSFollowMaxSize(v int) { global.SetCacheGTSFollowMaxSize(v) } + +// GetCacheGTSFollowTTL safely fetches the Configuration value for state's 'Cache.GTS.FollowTTL' field +func (st *ConfigState) GetCacheGTSFollowTTL() (v time.Duration) { + st.mutex.Lock() + v = st.config.Cache.GTS.FollowTTL + st.mutex.Unlock() + return +} + +// SetCacheGTSFollowTTL safely sets the Configuration value for state's 'Cache.GTS.FollowTTL' field +func (st *ConfigState) SetCacheGTSFollowTTL(v time.Duration) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.Cache.GTS.FollowTTL = v + st.reloadToViper() +} + +// CacheGTSFollowTTLFlag returns the flag name for the 'Cache.GTS.FollowTTL' field +func CacheGTSFollowTTLFlag() string { return "cache-gts-follow-ttl" } + +// GetCacheGTSFollowTTL safely fetches the value for global configuration 'Cache.GTS.FollowTTL' field +func GetCacheGTSFollowTTL() time.Duration { return global.GetCacheGTSFollowTTL() } + +// SetCacheGTSFollowTTL safely sets the value for global configuration 'Cache.GTS.FollowTTL' field +func SetCacheGTSFollowTTL(v time.Duration) { global.SetCacheGTSFollowTTL(v) } + +// GetCacheGTSFollowSweepFreq safely fetches the Configuration value for state's 'Cache.GTS.FollowSweepFreq' field +func (st *ConfigState) GetCacheGTSFollowSweepFreq() (v time.Duration) { + st.mutex.Lock() + v = st.config.Cache.GTS.FollowSweepFreq + st.mutex.Unlock() + return +} + +// SetCacheGTSFollowSweepFreq safely sets the Configuration value for state's 'Cache.GTS.FollowSweepFreq' field +func (st *ConfigState) SetCacheGTSFollowSweepFreq(v time.Duration) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.Cache.GTS.FollowSweepFreq = v + st.reloadToViper() +} + +// CacheGTSFollowSweepFreqFlag returns the flag name for the 'Cache.GTS.FollowSweepFreq' field +func CacheGTSFollowSweepFreqFlag() string { return "cache-gts-follow-sweep-freq" } + +// GetCacheGTSFollowSweepFreq safely fetches the value for global configuration 'Cache.GTS.FollowSweepFreq' field +func GetCacheGTSFollowSweepFreq() time.Duration { return global.GetCacheGTSFollowSweepFreq() } + +// SetCacheGTSFollowSweepFreq safely sets the value for global configuration 'Cache.GTS.FollowSweepFreq' field +func SetCacheGTSFollowSweepFreq(v time.Duration) { global.SetCacheGTSFollowSweepFreq(v) } + +// GetCacheGTSFollowRequestMaxSize safely fetches the Configuration value for state's 'Cache.GTS.FollowRequestMaxSize' field +func (st *ConfigState) GetCacheGTSFollowRequestMaxSize() (v int) { + st.mutex.Lock() + v = st.config.Cache.GTS.FollowRequestMaxSize + st.mutex.Unlock() + return +} + +// SetCacheGTSFollowRequestMaxSize safely sets the Configuration value for state's 'Cache.GTS.FollowRequestMaxSize' field +func (st *ConfigState) SetCacheGTSFollowRequestMaxSize(v int) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.Cache.GTS.FollowRequestMaxSize = v + st.reloadToViper() +} + +// CacheGTSFollowRequestMaxSizeFlag returns the flag name for the 'Cache.GTS.FollowRequestMaxSize' field +func CacheGTSFollowRequestMaxSizeFlag() string { return "cache-gts-follow-request-max-size" } + +// GetCacheGTSFollowRequestMaxSize safely fetches the value for global configuration 'Cache.GTS.FollowRequestMaxSize' field +func GetCacheGTSFollowRequestMaxSize() int { return global.GetCacheGTSFollowRequestMaxSize() } + +// SetCacheGTSFollowRequestMaxSize safely sets the value for global configuration 'Cache.GTS.FollowRequestMaxSize' field +func SetCacheGTSFollowRequestMaxSize(v int) { global.SetCacheGTSFollowRequestMaxSize(v) } + +// GetCacheGTSFollowRequestTTL safely fetches the Configuration value for state's 'Cache.GTS.FollowRequestTTL' field +func (st *ConfigState) GetCacheGTSFollowRequestTTL() (v time.Duration) { + st.mutex.Lock() + v = st.config.Cache.GTS.FollowRequestTTL + st.mutex.Unlock() + return +} + +// SetCacheGTSFollowRequestTTL safely sets the Configuration value for state's 'Cache.GTS.FollowRequestTTL' field +func (st *ConfigState) SetCacheGTSFollowRequestTTL(v time.Duration) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.Cache.GTS.FollowRequestTTL = v + st.reloadToViper() +} + +// CacheGTSFollowRequestTTLFlag returns the flag name for the 'Cache.GTS.FollowRequestTTL' field +func CacheGTSFollowRequestTTLFlag() string { return "cache-gts-follow-request-ttl" } + +// GetCacheGTSFollowRequestTTL safely fetches the value for global configuration 'Cache.GTS.FollowRequestTTL' field +func GetCacheGTSFollowRequestTTL() time.Duration { return global.GetCacheGTSFollowRequestTTL() } + +// SetCacheGTSFollowRequestTTL safely sets the value for global configuration 'Cache.GTS.FollowRequestTTL' field +func SetCacheGTSFollowRequestTTL(v time.Duration) { global.SetCacheGTSFollowRequestTTL(v) } + +// GetCacheGTSFollowRequestSweepFreq safely fetches the Configuration value for state's 'Cache.GTS.FollowRequestSweepFreq' field +func (st *ConfigState) GetCacheGTSFollowRequestSweepFreq() (v time.Duration) { + st.mutex.Lock() + v = st.config.Cache.GTS.FollowRequestSweepFreq + st.mutex.Unlock() + return +} + +// SetCacheGTSFollowRequestSweepFreq safely sets the Configuration value for state's 'Cache.GTS.FollowRequestSweepFreq' field +func (st *ConfigState) SetCacheGTSFollowRequestSweepFreq(v time.Duration) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.Cache.GTS.FollowRequestSweepFreq = v + st.reloadToViper() +} + +// CacheGTSFollowRequestSweepFreqFlag returns the flag name for the 'Cache.GTS.FollowRequestSweepFreq' field +func CacheGTSFollowRequestSweepFreqFlag() string { return "cache-gts-follow-request-sweep-freq" } + +// GetCacheGTSFollowRequestSweepFreq safely fetches the value for global configuration 'Cache.GTS.FollowRequestSweepFreq' field +func GetCacheGTSFollowRequestSweepFreq() time.Duration { + return global.GetCacheGTSFollowRequestSweepFreq() +} + +// SetCacheGTSFollowRequestSweepFreq safely sets the value for global configuration 'Cache.GTS.FollowRequestSweepFreq' field +func SetCacheGTSFollowRequestSweepFreq(v time.Duration) { global.SetCacheGTSFollowRequestSweepFreq(v) } + // GetCacheGTSMediaMaxSize safely fetches the Configuration value for state's 'Cache.GTS.MediaMaxSize' field func (st *ConfigState) GetCacheGTSMediaMaxSize() (v int) { st.mutex.Lock() @@ -2878,6 +3030,81 @@ func GetCacheGTSStatusSweepFreq() time.Duration { return global.GetCacheGTSStatu // SetCacheGTSStatusSweepFreq safely sets the value for global configuration 'Cache.GTS.StatusSweepFreq' field func SetCacheGTSStatusSweepFreq(v time.Duration) { global.SetCacheGTSStatusSweepFreq(v) } +// GetCacheGTSStatusFaveMaxSize safely fetches the Configuration value for state's 'Cache.GTS.StatusFaveMaxSize' field +func (st *ConfigState) GetCacheGTSStatusFaveMaxSize() (v int) { + st.mutex.Lock() + v = st.config.Cache.GTS.StatusFaveMaxSize + st.mutex.Unlock() + return +} + +// SetCacheGTSStatusFaveMaxSize safely sets the Configuration value for state's 'Cache.GTS.StatusFaveMaxSize' field +func (st *ConfigState) SetCacheGTSStatusFaveMaxSize(v int) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.Cache.GTS.StatusFaveMaxSize = v + st.reloadToViper() +} + +// CacheGTSStatusFaveMaxSizeFlag returns the flag name for the 'Cache.GTS.StatusFaveMaxSize' field +func CacheGTSStatusFaveMaxSizeFlag() string { return "cache-gts-status-fave-max-size" } + +// GetCacheGTSStatusFaveMaxSize safely fetches the value for global configuration 'Cache.GTS.StatusFaveMaxSize' field +func GetCacheGTSStatusFaveMaxSize() int { return global.GetCacheGTSStatusFaveMaxSize() } + +// SetCacheGTSStatusFaveMaxSize safely sets the value for global configuration 'Cache.GTS.StatusFaveMaxSize' field +func SetCacheGTSStatusFaveMaxSize(v int) { global.SetCacheGTSStatusFaveMaxSize(v) } + +// GetCacheGTSStatusFaveTTL safely fetches the Configuration value for state's 'Cache.GTS.StatusFaveTTL' field +func (st *ConfigState) GetCacheGTSStatusFaveTTL() (v time.Duration) { + st.mutex.Lock() + v = st.config.Cache.GTS.StatusFaveTTL + st.mutex.Unlock() + return +} + +// SetCacheGTSStatusFaveTTL safely sets the Configuration value for state's 'Cache.GTS.StatusFaveTTL' field +func (st *ConfigState) SetCacheGTSStatusFaveTTL(v time.Duration) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.Cache.GTS.StatusFaveTTL = v + st.reloadToViper() +} + +// CacheGTSStatusFaveTTLFlag returns the flag name for the 'Cache.GTS.StatusFaveTTL' field +func CacheGTSStatusFaveTTLFlag() string { return "cache-gts-status-fave-ttl" } + +// GetCacheGTSStatusFaveTTL safely fetches the value for global configuration 'Cache.GTS.StatusFaveTTL' field +func GetCacheGTSStatusFaveTTL() time.Duration { return global.GetCacheGTSStatusFaveTTL() } + +// SetCacheGTSStatusFaveTTL safely sets the value for global configuration 'Cache.GTS.StatusFaveTTL' field +func SetCacheGTSStatusFaveTTL(v time.Duration) { global.SetCacheGTSStatusFaveTTL(v) } + +// GetCacheGTSStatusFaveSweepFreq safely fetches the Configuration value for state's 'Cache.GTS.StatusFaveSweepFreq' field +func (st *ConfigState) GetCacheGTSStatusFaveSweepFreq() (v time.Duration) { + st.mutex.Lock() + v = st.config.Cache.GTS.StatusFaveSweepFreq + st.mutex.Unlock() + return +} + +// SetCacheGTSStatusFaveSweepFreq safely sets the Configuration value for state's 'Cache.GTS.StatusFaveSweepFreq' field +func (st *ConfigState) SetCacheGTSStatusFaveSweepFreq(v time.Duration) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.Cache.GTS.StatusFaveSweepFreq = v + st.reloadToViper() +} + +// CacheGTSStatusFaveSweepFreqFlag returns the flag name for the 'Cache.GTS.StatusFaveSweepFreq' field +func CacheGTSStatusFaveSweepFreqFlag() string { return "cache-gts-status-fave-sweep-freq" } + +// GetCacheGTSStatusFaveSweepFreq safely fetches the value for global configuration 'Cache.GTS.StatusFaveSweepFreq' field +func GetCacheGTSStatusFaveSweepFreq() time.Duration { return global.GetCacheGTSStatusFaveSweepFreq() } + +// SetCacheGTSStatusFaveSweepFreq safely sets the value for global configuration 'Cache.GTS.StatusFaveSweepFreq' field +func SetCacheGTSStatusFaveSweepFreq(v time.Duration) { global.SetCacheGTSStatusFaveSweepFreq(v) } + // GetCacheGTSTombstoneMaxSize safely fetches the Configuration value for state's 'Cache.GTS.TombstoneMaxSize' field func (st *ConfigState) GetCacheGTSTombstoneMaxSize() (v int) { st.mutex.Lock() @@ -3103,6 +3330,81 @@ func GetCacheGTSWebfingerSweepFreq() time.Duration { return global.GetCacheGTSWe // SetCacheGTSWebfingerSweepFreq safely sets the value for global configuration 'Cache.GTS.WebfingerSweepFreq' field func SetCacheGTSWebfingerSweepFreq(v time.Duration) { global.SetCacheGTSWebfingerSweepFreq(v) } +// GetCacheVisibilityMaxSize safely fetches the Configuration value for state's 'Cache.VisibilityMaxSize' field +func (st *ConfigState) GetCacheVisibilityMaxSize() (v int) { + st.mutex.Lock() + v = st.config.Cache.VisibilityMaxSize + st.mutex.Unlock() + return +} + +// SetCacheVisibilityMaxSize safely sets the Configuration value for state's 'Cache.VisibilityMaxSize' field +func (st *ConfigState) SetCacheVisibilityMaxSize(v int) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.Cache.VisibilityMaxSize = v + st.reloadToViper() +} + +// CacheVisibilityMaxSizeFlag returns the flag name for the 'Cache.VisibilityMaxSize' field +func CacheVisibilityMaxSizeFlag() string { return "cache-visibility-max-size" } + +// GetCacheVisibilityMaxSize safely fetches the value for global configuration 'Cache.VisibilityMaxSize' field +func GetCacheVisibilityMaxSize() int { return global.GetCacheVisibilityMaxSize() } + +// SetCacheVisibilityMaxSize safely sets the value for global configuration 'Cache.VisibilityMaxSize' field +func SetCacheVisibilityMaxSize(v int) { global.SetCacheVisibilityMaxSize(v) } + +// GetCacheVisibilityTTL safely fetches the Configuration value for state's 'Cache.VisibilityTTL' field +func (st *ConfigState) GetCacheVisibilityTTL() (v time.Duration) { + st.mutex.Lock() + v = st.config.Cache.VisibilityTTL + st.mutex.Unlock() + return +} + +// SetCacheVisibilityTTL safely sets the Configuration value for state's 'Cache.VisibilityTTL' field +func (st *ConfigState) SetCacheVisibilityTTL(v time.Duration) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.Cache.VisibilityTTL = v + st.reloadToViper() +} + +// CacheVisibilityTTLFlag returns the flag name for the 'Cache.VisibilityTTL' field +func CacheVisibilityTTLFlag() string { return "cache-visibility-ttl" } + +// GetCacheVisibilityTTL safely fetches the value for global configuration 'Cache.VisibilityTTL' field +func GetCacheVisibilityTTL() time.Duration { return global.GetCacheVisibilityTTL() } + +// SetCacheVisibilityTTL safely sets the value for global configuration 'Cache.VisibilityTTL' field +func SetCacheVisibilityTTL(v time.Duration) { global.SetCacheVisibilityTTL(v) } + +// GetCacheVisibilitySweepFreq safely fetches the Configuration value for state's 'Cache.VisibilitySweepFreq' field +func (st *ConfigState) GetCacheVisibilitySweepFreq() (v time.Duration) { + st.mutex.Lock() + v = st.config.Cache.VisibilitySweepFreq + st.mutex.Unlock() + return +} + +// SetCacheVisibilitySweepFreq safely sets the Configuration value for state's 'Cache.VisibilitySweepFreq' field +func (st *ConfigState) SetCacheVisibilitySweepFreq(v time.Duration) { + st.mutex.Lock() + defer st.mutex.Unlock() + st.config.Cache.VisibilitySweepFreq = v + st.reloadToViper() +} + +// CacheVisibilitySweepFreqFlag returns the flag name for the 'Cache.VisibilitySweepFreq' field +func CacheVisibilitySweepFreqFlag() string { return "cache-visibility-sweep-freq" } + +// GetCacheVisibilitySweepFreq safely fetches the value for global configuration 'Cache.VisibilitySweepFreq' field +func GetCacheVisibilitySweepFreq() time.Duration { return global.GetCacheVisibilitySweepFreq() } + +// SetCacheVisibilitySweepFreq safely sets the value for global configuration 'Cache.VisibilitySweepFreq' field +func SetCacheVisibilitySweepFreq(v time.Duration) { global.SetCacheVisibilitySweepFreq(v) } + // GetAdminAccountUsername safely fetches the Configuration value for state's 'AdminAccountUsername' field func (st *ConfigState) GetAdminAccountUsername() (v string) { st.mutex.Lock() |