From 69b31e87e7da685d1ed0d88aad2b575b8421456d Mon Sep 17 00:00:00 2001 From: Holger Obermaier <40787752+ho-ob@users.noreply.github.com> Date: Tue, 15 Feb 2022 11:27:42 +0100 Subject: [PATCH] Fix: Start cache manager only when NumCacheIntervals > 0 --- internal/metricRouter/metricRouter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/metricRouter/metricRouter.go b/internal/metricRouter/metricRouter.go index c5ff0bd..e8c30cc 100644 --- a/internal/metricRouter/metricRouter.go +++ b/internal/metricRouter/metricRouter.go @@ -100,7 +100,7 @@ func (r *metricRouter) Init(ticker mct.MultiChanTicker, wg *sync.WaitGroup, rout cclog.ComponentError("MetricRouter", err.Error()) return err } - if r.config.NumCacheIntervals >= 0 { + if r.config.NumCacheIntervals > 0 { r.cache, err = NewCache(r.cache_input, r.ticker, &r.cachewg, r.config.NumCacheIntervals) if err != nil { cclog.ComponentError("MetricRouter", "MetricCache initialization failed:", err.Error())