Caching: Add flag to disable clean cache button (#113598)

Caching: add flag to disable clean cache button
This commit is contained in:
Bruno
2025-11-10 12:08:56 -03:00
committed by GitHub
parent 2dc48c0b98
commit f094a9d5e5
3 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -78,7 +78,8 @@ type FrontendSettingsAzureDTO struct {
}
type FrontendSettingsCachingDTO struct {
Enabled bool `json:"enabled"`
Enabled bool `json:"enabled"`
CleanCacheEnabled bool `json:"cleanCacheEnabled"`
}
type FrontendSettingsRecordedQueriesDTO struct {
+2 -1
View File
@@ -323,7 +323,8 @@ func (hs *HTTPServer) getFrontendSettings(c *contextmodel.ReqContext) (*dtos.Fro
},
Caching: dtos.FrontendSettingsCachingDTO{
Enabled: hs.Cfg.SectionWithEnvOverrides("caching").Key("enabled").MustBool(true),
Enabled: hs.Cfg.SectionWithEnvOverrides("caching").Key("enabled").MustBool(true),
CleanCacheEnabled: hs.Cfg.SectionWithEnvOverrides("caching").Key("clean_cache_enabled").MustBool(true),
},
RecordedQueries: dtos.FrontendSettingsRecordedQueriesDTO{
Enabled: hs.Cfg.SectionWithEnvOverrides("recorded_queries").Key("enabled").MustBool(true),