暂时不删除多余的*.cache.tmp,以防产生性能问题

This commit is contained in:
刘祥超
2021-11-21 16:10:07 +08:00
parent 6af59e0bd0
commit eeee3da941

View File

@@ -672,17 +672,12 @@ func (this *FileStorage) initList() error {
} }
// 使用异步防止阻塞主线程 // 使用异步防止阻塞主线程
go func() { /**go func() {
dir := this.dir() dir := this.dir()
// 清除tmp // 清除tmp
files, err := filepath.Glob(dir + "/*/*/*.cache.tmp") // TODO 需要一个更加高效的实现
if err == nil && len(files) > 0 { }()**/
for _, path := range files {
_ = os.Remove(path)
}
}
}()
// 启动定时清理任务 // 启动定时清理任务
var autoPurgeInterval = this.policy.PersistenceAutoPurgeInterval var autoPurgeInterval = this.policy.PersistenceAutoPurgeInterval