From 8d57efee7e9c71d27c21cb714cbec45001276e1a Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Thu, 21 Apr 2022 09:40:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=BB=98=E8=AE=A4=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E5=AE=B9=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/ttlcache/cache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/ttlcache/cache.go b/internal/ttlcache/cache.go index e0a669c..564e4c8 100644 --- a/internal/ttlcache/cache.go +++ b/internal/ttlcache/cache.go @@ -25,12 +25,12 @@ type Cache struct { func NewCache(opt ...OptionInterface) *Cache { var countPieces = 256 - var maxItems = 2_000_000 + var maxItems = 1_000_000 var totalMemory = utils.SystemMemoryGB() if totalMemory < 2 { // 我们限制内存过小的服务能够使用的数量 - maxItems = 1_000_000 + maxItems = 500_000 } else { var delta = totalMemory / 8 if delta > 0 {