From bd71f102e82dc0f8cfd5b06f59475a3c658fb7cf Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin <valyala@gmail.com>
Date: Mon, 5 Jul 2021 15:35:30 +0300
Subject: [PATCH] lib/workingsetcache: typo fixes after
 d0c830039de90bda4eba3c5be01f4be7c822e7f6

---
 lib/workingsetcache/cache.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/workingsetcache/cache.go b/lib/workingsetcache/cache.go
index f73f500deb..790751d4b6 100644
--- a/lib/workingsetcache/cache.go
+++ b/lib/workingsetcache/cache.go
@@ -80,7 +80,6 @@ func Load(filePath string, maxBytes int, expireDuration time.Duration) *Cache {
 // Stop must be called on the returned cache when it is no longer needed.
 func New(maxBytes int, expireDuration time.Duration) *Cache {
 	// Split maxBytes between curr and prev caches.
-	maxBytes /= 2
 	curr := fastcache.New(maxBytes)
 	c := newCacheInternal(curr, fastcache.New(1024), maxBytes, split)
 	c.runWatchers(expireDuration)
@@ -89,6 +88,7 @@ func New(maxBytes int, expireDuration time.Duration) *Cache {
 
 func newCacheInternal(curr, prev *fastcache.Cache, maxBytes, mode int) *Cache {
 	var c Cache
+	c.maxBytes = maxBytes
 	c.curr.Store(curr)
 	c.prev.Store(prev)
 	c.stopCh = make(chan struct{})