From 90fcc31f12a62c5de80ce5ad84f858321d8756e8 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Sun, 21 Nov 2021 16:10:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E6=97=B6=E4=B8=8D=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E7=9A=84*.cache.tmp=EF=BC=8C=E4=BB=A5?= =?UTF-8?q?=E9=98=B2=E4=BA=A7=E7=94=9F=E6=80=A7=E8=83=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/caches/storage_file.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/internal/caches/storage_file.go b/internal/caches/storage_file.go index 0b07c3e..e51b599 100644 --- a/internal/caches/storage_file.go +++ b/internal/caches/storage_file.go @@ -672,17 +672,12 @@ func (this *FileStorage) initList() error { } // 使用异步防止阻塞主线程 - go func() { + /**go func() { dir := this.dir() // 清除tmp - files, err := filepath.Glob(dir + "/*/*/*.cache.tmp") - if err == nil && len(files) > 0 { - for _, path := range files { - _ = os.Remove(path) - } - } - }() + // TODO 需要一个更加高效的实现 + }()**/ // 启动定时清理任务 var autoPurgeInterval = this.policy.PersistenceAutoPurgeInterval