mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-06 18:10:26 +08:00
暂时不删除多余的*.cache.tmp,以防产生性能问题
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user