aboutsummaryrefslogtreecommitdiffstats
path: root/models/system/setting_key.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-11-10 14:43:53 +0800
committerGitHub <noreply@github.com>2022-11-10 14:43:53 +0800
commit385462d36c75e809ee082d3432941f938cbdffc9 (patch)
tree938946297d1c0fa736852e1054f732ed2b0db686 /models/system/setting_key.go
parentce5aafbc698de72d8acf03851dc5db057b3cc01f (diff)
downloadgitea-385462d36c75e809ee082d3432941f938cbdffc9.tar.gz
gitea-385462d36c75e809ee082d3432941f938cbdffc9.zip
Fix dashboard ignored system setting cache (#21621)
This is a performance regression from #18058 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'models/system/setting_key.go')
-rw-r--r--models/system/setting_key.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/models/system/setting_key.go b/models/system/setting_key.go
index 5a6ea6ed72..14105b89d0 100644
--- a/models/system/setting_key.go
+++ b/models/system/setting_key.go
@@ -9,3 +9,8 @@ const (
KeyPictureDisableGravatar = "picture.disable_gravatar"
KeyPictureEnableFederatedAvatar = "picture.enable_federated_avatar"
)
+
+// genSettingCacheKey returns the cache key for some configuration
+func genSettingCacheKey(key string) string {
+ return "system.setting." + key
+}