From df6dcbbbc857f9e3aa08c98358530fb4e5cbdf48 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Sat, 7 Oct 2023 12:37:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E6=97=B6=E5=A2=9E=E5=8A=A0=E6=96=87=E4=BB=B6=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E5=86=99=E8=AE=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/caches/storage_file.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/caches/storage_file.go b/internal/caches/storage_file.go index dfb5e75..50e697d 100644 --- a/internal/caches/storage_file.go +++ b/internal/caches/storage_file.go @@ -1073,7 +1073,9 @@ func (this *FileStorage) purgeLoop() { for i := 0; i < times; i++ { countFound, err := this.list.Purge(purgeCount, func(hash string) error { path, _ := this.hashPath(hash) + fsutils.WriteBegin() err := this.removeCacheFile(path) + fsutils.WriteEnd() if err != nil && !os.IsNotExist(err) { remotelogs.Error("CACHE", "purge '"+path+"' error: "+err.Error()) } @@ -1134,7 +1136,9 @@ func (this *FileStorage) purgeLoop() { remotelogs.Println("CACHE", prefix+"LFU purge policy '"+this.policy.Name+"' id: "+types.String(this.policy.Id)+", count: "+types.String(count)) err := this.list.PurgeLFU(count, func(hash string) error { path, _ := this.hashPath(hash) + fsutils.WriteBegin() err := this.removeCacheFile(path) + fsutils.WriteEnd() if err != nil && !os.IsNotExist(err) { remotelogs.Error("CACHE", "purge '"+path+"' error: "+err.Error()) }