Update CacheSystem

优化缓存系统代码结构
This commit is contained in:
hevinci
2022-08-15 11:55:13 +08:00
parent aba68f859f
commit fbbf762e70
26 changed files with 306 additions and 446 deletions
@@ -198,7 +198,7 @@ namespace YooAsset
foreach (var patchBundle in _remotePatchManifest.BundleList)
{
// 忽略缓存文件
if (CacheSystem.ContainsVerifyFile(patchBundle))
if (CacheSystem.IsCached(patchBundle))
continue;
// 忽略APP资源
@@ -209,16 +209,6 @@ namespace YooAsset
continue;
}
// 注意:通过比对文件大小做快速的文件校验!
// 注意:在初始化的时候会去做最终校验!
string filePath = SandboxHelper.MakeCacheFilePath(patchBundle.FileName);
if (File.Exists(filePath))
{
long fileSize = FileUtility.GetFileSize(filePath);
if (fileSize == patchBundle.FileSize)
continue;
}
downloadList.Add(patchBundle);
}