From ae1454f9bb760bbaff434e638cc3dbbd122c2dce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Mon, 2 Oct 2023 10:40:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=83=AD=E9=97=A8=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E7=AE=97=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/caches/storage_file.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/caches/storage_file.go b/internal/caches/storage_file.go index 55eb780..1b09b11 100644 --- a/internal/caches/storage_file.go +++ b/internal/caches/storage_file.go @@ -1170,6 +1170,9 @@ func (this *FileStorage) hotLoop() { var result = []*HotItem{} // [ {key: ..., hits: ...}, ... ] for _, v := range this.hotMap { + if v.Hits <= 1 { + continue + } result = append(result, v) }