Skip to content

Commit

Permalink
Add debug message of cache capacity size
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolay Tkachenko committed Apr 11, 2022
1 parent d09914e commit b4341f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/platform/denylist/denylist.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b4341f1

Please sign in to comment.