From b4341f14af60d92b6af8cfd49a51e2d0d2cc1525 Mon Sep 17 00:00:00 2001 From: Nikolay Tkachenko Date: Mon, 11 Apr 2022 15:26:47 +0300 Subject: [PATCH] Add debug message of cache capacity size --- internal/platform/denylist/denylist.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/platform/denylist/denylist.go b/internal/platform/denylist/denylist.go index 99ee6cb..d0546bd 100644 --- a/internal/platform/denylist/denylist.go +++ b/internal/platform/denylist/denylist.go @@ -59,6 +59,8 @@ func New(cfg *config.APIFWConfiguration, logger *logrus.Logger) (*DeniedTokens, // max cost = total bytes found in the storage + 5% maxCost := totalCacheCapacity + totalCacheCapacity/20 + logger.Debugf("Denylist: cache capacity: %d bytes", maxCost) + cache, err := ristretto.NewCache(&ristretto.Config{ NumCounters: maxCost * 10, // recommended value MaxCost: maxCost,