Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanchriswhite committed Dec 18, 2024
1 parent 3abc4b5 commit afcde67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkg/client/query/cache/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ func (cfg *queryCacheConfig) Validate() error {

// WithHistoricalMode enables historical caching with the given maxVersionAge
// configuration; if 0, no historical pruning is performed.
func WithHistoricalMode(numRetainedVersions int64) QueryCacheOptionFn {
func WithHistoricalMode(maxVersionAge int64) QueryCacheOptionFn {
return func(cfg *queryCacheConfig) {
cfg.historical = true
cfg.maxVersionAge = numRetainedVersions
cfg.maxVersionAge = maxVersionAge
}
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/client/query/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
)

const (
defaultPruneOlderThan = 100
defaultMaxKeys = 1000
defaultMaxVersionAge = 100
defaultMaxKeys = 1000
)

// paramsQuerierConfig is the configuration for parameter queriers. It is intended
Expand All @@ -33,7 +33,7 @@ type ParamsQuerierOptionFn func(*paramsQuerierConfig)
func DefaultParamsQuerierConfig() *paramsQuerierConfig {
return &paramsQuerierConfig{
cacheOpts: []cache.QueryCacheOptionFn{
cache.WithHistoricalMode(defaultPruneOlderThan),
cache.WithHistoricalMode(defaultMaxVersionAge),
cache.WithMaxKeys(defaultMaxKeys),
cache.WithEvictionPolicy(cache.FirstInFirstOut),
},
Expand Down

0 comments on commit afcde67

Please sign in to comment.