feat(dashboard): Org-aware cache for schema migration (#115025)
* fix: use dsIndexProvider cache on migrations * chore: use same comment as before * feat: org-aware TTL cache for schemaversion migration and warmup for single tenant * chore: use LRU cache * chore: change DefaultCacheTTL to 1 minute * chore: address copilot reviews * chore: use expirable cache * chore: remove unused import
This commit is contained in:
@@ -247,11 +247,12 @@ type Cfg struct {
|
||||
MetricsGrafanaEnvironmentInfo map[string]string
|
||||
|
||||
// Dashboards
|
||||
DashboardVersionsToKeep int
|
||||
MinRefreshInterval string
|
||||
DefaultHomeDashboardPath string
|
||||
DashboardPerformanceMetrics []string
|
||||
PanelSeriesLimit int
|
||||
DashboardVersionsToKeep int
|
||||
MinRefreshInterval string
|
||||
DefaultHomeDashboardPath string
|
||||
DashboardPerformanceMetrics []string
|
||||
PanelSeriesLimit int
|
||||
DashboardSchemaMigrationCacheTTL time.Duration
|
||||
|
||||
// Auth
|
||||
LoginCookieName string
|
||||
@@ -1237,6 +1238,7 @@ func (cfg *Cfg) parseINIFile(iniFile *ini.File) error {
|
||||
cfg.DefaultHomeDashboardPath = dashboards.Key("default_home_dashboard_path").MustString("")
|
||||
cfg.DashboardPerformanceMetrics = util.SplitString(dashboards.Key("dashboard_performance_metrics").MustString(""))
|
||||
cfg.PanelSeriesLimit = dashboards.Key("panel_series_limit").MustInt(0)
|
||||
cfg.DashboardSchemaMigrationCacheTTL = dashboards.Key("schema_migration_cache_ttl").MustDuration(time.Minute)
|
||||
|
||||
if err := readUserSettings(iniFile, cfg); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user