From e81c1de6bb0dfbf9f0e9eddaedc5281c79c2b73f Mon Sep 17 00:00:00 2001 From: Marcin Kaciuba Date: Tue, 25 Oct 2022 21:51:53 +0200 Subject: [PATCH] fix: config name for minUseCount --- pkg/cache/cache.go | 2 +- pkg/config/types.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cache/cache.go b/pkg/cache/cache.go index 23edd17..9b22d7f 100644 --- a/pkg/cache/cache.go +++ b/pkg/cache/cache.go @@ -20,7 +20,7 @@ func Create(cacheCfg config.CacheCfg) ResponseCache { switch cacheCfg.Type { case "redis": monitoring.Log().Info("Creating redis cache", zap.Strings("addr", cacheCfg.Address)) - return NewRedis(cacheCfg.Address, cacheCfg.ClientConfig, CacheCfg{MaxItemSize: cacheCfg.MaxCacheItemSize}) + return NewRedis(cacheCfg.Address, cacheCfg.ClientConfig, CacheCfg{MaxItemSize: cacheCfg.MaxCacheItemSize, MinUseCount: cacheCfg.MinUseCount}) case "redis-cluster": monitoring.Log().Info("Creating redis-cluster cache", zap.Strings("addr", cacheCfg.Address)) return NewRedisCluster(cacheCfg.Address, cacheCfg.ClientConfig, CacheCfg{ diff --git a/pkg/config/types.go b/pkg/config/types.go index 62cf1cb..7878187 100644 --- a/pkg/config/types.go +++ b/pkg/config/types.go @@ -169,7 +169,7 @@ type CacheCfg struct { Address []string `yaml:"address"` MaxCacheItemSize int64 `yaml:"maxCacheItemSizeMB"` CacheSize int64 `yaml:"cacheSize"` - MinUseCount uint64 `yaml:"MinUseCount"` + MinUseCount uint64 `yaml:"minUseCount"` ClientConfig map[string]string `yaml:"clientConfig"` }