Add clear unused cache files method.

增加清空缓存文件的方法。
This commit is contained in:
hevinci
2022-05-02 15:03:36 +08:00
parent 2c9819762a
commit 873d873194
12 changed files with 191 additions and 162 deletions
@@ -277,7 +277,7 @@ namespace YooAsset
}
// 查看文件是否存在
string filePath = SandboxHelper.MakeSandboxCacheFilePath(patchBundle.Hash);
string filePath = SandboxHelper.MakeCacheFilePath(patchBundle.Hash);
if (File.Exists(filePath) == false)
continue;
@@ -321,7 +321,7 @@ namespace YooAsset
}
private bool RunThread(PatchBundle patchBundle)
{
string filePath = SandboxHelper.MakeSandboxCacheFilePath(patchBundle.Hash);
string filePath = SandboxHelper.MakeCacheFilePath(patchBundle.Hash);
ThreadInfo info = new ThreadInfo(filePath, patchBundle);
return ThreadPool.QueueUserWorkItem(new WaitCallback(VerifyInThread), info);
}