feat: introduce ttl cache for bleve indices (#106842)

This commit is contained in:
Mustafa Sencer Özcan
2025-06-17 16:28:51 +02:00
committed by GitHub
parent 1dfbd215cd
commit b48337a7c8
5 changed files with 37 additions and 18 deletions
+1
View File
@@ -561,6 +561,7 @@ type Cfg struct {
IndexFileThreshold int
IndexMinCount int
IndexRebuildInterval time.Duration
IndexCacheTTL time.Duration
EnableSharding bool
MemberlistBindAddr string
MemberlistAdvertiseAddr string
+1
View File
@@ -66,6 +66,7 @@ func (cfg *Cfg) setUnifiedStorageConfig() {
cfg.IndexMinCount = section.Key("index_min_count").MustInt(1)
// default to 24 hours because usage insights summarizes the data every 24 hours
cfg.IndexRebuildInterval = section.Key("index_rebuild_interval").MustDuration(24 * time.Hour)
cfg.IndexCacheTTL = section.Key("index_cache_ttl").MustDuration(10 * time.Minute)
cfg.SprinklesApiServer = section.Key("sprinkles_api_server").String()
cfg.SprinklesApiServerPageLimit = section.Key("sprinkles_api_server_page_limit").MustInt(100)
cfg.CACertPath = section.Key("ca_cert_path").String()