summaryrefslogtreecommitdiff
path: root/internal/config/helpers.gen.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2024-06-06 10:44:43 +0000
committerLibravatar GitHub <noreply@github.com>2024-06-06 11:44:43 +0100
commit5dcc954072ca0a27107ed3fdc6806986f61df7d0 (patch)
tree7a6380bf39e99dbcfee4fbe1434697706637d2bc /internal/config/helpers.gen.go
parent[bugfix] Don't nil emojis + fields on blocked accounts (#2968) (diff)
downloadgotosocial-5dcc954072ca0a27107ed3fdc6806986f61df7d0.tar.xz
[feature] do not uncache status / emoji media if attached status is bookmarked (#2956)
* do not uncache status / emoji media if attached status is bookmarked * add status bookmark and bookmark IDs caches * update status bookmark tests * move IsStatusBookmarkedBy() to StatusBookmark{} interface, rely on cache * fix envparsing.sh test
Diffstat (limited to 'internal/config/helpers.gen.go')
-rw-r--r--internal/config/helpers.gen.go50
1 files changed, 50 insertions, 0 deletions
diff --git a/internal/config/helpers.gen.go b/internal/config/helpers.gen.go
index c986dd19d..2f37cbacb 100644
--- a/internal/config/helpers.gen.go
+++ b/internal/config/helpers.gen.go
@@ -3550,6 +3550,56 @@ func GetCacheStatusMemRatio() float64 { return global.GetCacheStatusMemRatio() }
// SetCacheStatusMemRatio safely sets the value for global configuration 'Cache.StatusMemRatio' field
func SetCacheStatusMemRatio(v float64) { global.SetCacheStatusMemRatio(v) }
+// GetCacheStatusBookmarkMemRatio safely fetches the Configuration value for state's 'Cache.StatusBookmarkMemRatio' field
+func (st *ConfigState) GetCacheStatusBookmarkMemRatio() (v float64) {
+ st.mutex.RLock()
+ v = st.config.Cache.StatusBookmarkMemRatio
+ st.mutex.RUnlock()
+ return
+}
+
+// SetCacheStatusBookmarkMemRatio safely sets the Configuration value for state's 'Cache.StatusBookmarkMemRatio' field
+func (st *ConfigState) SetCacheStatusBookmarkMemRatio(v float64) {
+ st.mutex.Lock()
+ defer st.mutex.Unlock()
+ st.config.Cache.StatusBookmarkMemRatio = v
+ st.reloadToViper()
+}
+
+// CacheStatusBookmarkMemRatioFlag returns the flag name for the 'Cache.StatusBookmarkMemRatio' field
+func CacheStatusBookmarkMemRatioFlag() string { return "cache-status-bookmark-mem-ratio" }
+
+// GetCacheStatusBookmarkMemRatio safely fetches the value for global configuration 'Cache.StatusBookmarkMemRatio' field
+func GetCacheStatusBookmarkMemRatio() float64 { return global.GetCacheStatusBookmarkMemRatio() }
+
+// SetCacheStatusBookmarkMemRatio safely sets the value for global configuration 'Cache.StatusBookmarkMemRatio' field
+func SetCacheStatusBookmarkMemRatio(v float64) { global.SetCacheStatusBookmarkMemRatio(v) }
+
+// GetCacheStatusBookmarkIDsMemRatio safely fetches the Configuration value for state's 'Cache.StatusBookmarkIDsMemRatio' field
+func (st *ConfigState) GetCacheStatusBookmarkIDsMemRatio() (v float64) {
+ st.mutex.RLock()
+ v = st.config.Cache.StatusBookmarkIDsMemRatio
+ st.mutex.RUnlock()
+ return
+}
+
+// SetCacheStatusBookmarkIDsMemRatio safely sets the Configuration value for state's 'Cache.StatusBookmarkIDsMemRatio' field
+func (st *ConfigState) SetCacheStatusBookmarkIDsMemRatio(v float64) {
+ st.mutex.Lock()
+ defer st.mutex.Unlock()
+ st.config.Cache.StatusBookmarkIDsMemRatio = v
+ st.reloadToViper()
+}
+
+// CacheStatusBookmarkIDsMemRatioFlag returns the flag name for the 'Cache.StatusBookmarkIDsMemRatio' field
+func CacheStatusBookmarkIDsMemRatioFlag() string { return "cache-status-bookmark-ids-mem-ratio" }
+
+// GetCacheStatusBookmarkIDsMemRatio safely fetches the value for global configuration 'Cache.StatusBookmarkIDsMemRatio' field
+func GetCacheStatusBookmarkIDsMemRatio() float64 { return global.GetCacheStatusBookmarkIDsMemRatio() }
+
+// SetCacheStatusBookmarkIDsMemRatio safely sets the value for global configuration 'Cache.StatusBookmarkIDsMemRatio' field
+func SetCacheStatusBookmarkIDsMemRatio(v float64) { global.SetCacheStatusBookmarkIDsMemRatio(v) }
+
// GetCacheStatusFaveMemRatio safely fetches the Configuration value for state's 'Cache.StatusFaveMemRatio' field
func (st *ConfigState) GetCacheStatusFaveMemRatio() (v float64) {
st.mutex.RLock()