Skip to content

Commit

Permalink
add comment about fifo cache invalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeepsukhani committed Oct 16, 2020
1 parent 6e9cc7c commit ce6f93b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/loki/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,10 @@ func (t *Loki) initStore() (_ services.Service, err error) {
EnableFifoCache: true,
Fifocache: cache.FifoCacheConfig{
MaxSizeBytes: "200 MB",
// We snapshot the index in ingesters every minute for reads so reduce the index cache validity by a minute
// We snapshot the index in ingesters every minute for reads so reduce the index cache validity by a minute.
// This is usually set in StorageConfig.IndexCacheValidity but since this is exclusively used for caching the index entries,
// I(Sandeep) am setting it here which also helps reduce some CPU cycles and allocations required for
// unmarshalling the cached data to check the expiry.
Validity: t.cfg.StorageConfig.IndexCacheValidity - 1*time.Minute,
},
}
Expand Down

0 comments on commit ce6f93b

Please sign in to comment.