diff --git a/Assets/YooAsset/Runtime/CacheSystem/Operations/PackageCachingOperation.cs b/Assets/YooAsset/Runtime/CacheSystem/Operations/PackageCachingOperation.cs
index ae87610..8f9f55a 100644
--- a/Assets/YooAsset/Runtime/CacheSystem/Operations/PackageCachingOperation.cs
+++ b/Assets/YooAsset/Runtime/CacheSystem/Operations/PackageCachingOperation.cs
@@ -39,7 +39,6 @@ namespace YooAsset
{
_findCacheFilesOp = new FindCacheFilesOperation(_packageName);
OperationSystem.StartOperation(_findCacheFilesOp);
- _steps = ESteps.VerifyCacheFiles;
}
Progress = _findCacheFilesOp.Progress;
@@ -55,7 +54,6 @@ namespace YooAsset
{
_verifyCacheFilesOp = VerifyCacheFilesOperation.CreateOperation(_findCacheFilesOp.VerifyElements);
OperationSystem.StartOperation(_verifyCacheFilesOp);
- _steps = ESteps.VerifyCacheFiles;
}
Progress = _verifyCacheFilesOp.Progress;
diff --git a/Assets/YooAsset/Runtime/Utility/YooHelper.cs b/Assets/YooAsset/Runtime/Utility/YooHelper.cs
index 83131a5..25a03d2 100644
--- a/Assets/YooAsset/Runtime/Utility/YooHelper.cs
+++ b/Assets/YooAsset/Runtime/Utility/YooHelper.cs
@@ -124,19 +124,31 @@ namespace YooAsset
///
/// 获取缓存的BundleFile文件夹路径
///
+ private readonly static Dictionary _cachedBundleFileFolder = new Dictionary(100);
public static string GetCachedBundleFileFolderPath(string packageName)
{
- string root = PathHelper.MakePersistentLoadPath(CacheFolderName);
- return $"{root}/{packageName}/{CachedBundleFileFolder}";
+ if (_cachedBundleFileFolder.TryGetValue(packageName, out string value) == false)
+ {
+ string root = PathHelper.MakePersistentLoadPath(CacheFolderName);
+ value = $"{root}/{packageName}/{CachedBundleFileFolder}";
+ _cachedBundleFileFolder.Add(packageName, value);
+ }
+ return value;
}
///
/// 获取缓存的RawFile文件夹路径
///
+ private readonly static Dictionary _cachedRawFileFolder = new Dictionary(100);
public static string GetCachedRawFileFolderPath(string packageName)
{
- string root = PathHelper.MakePersistentLoadPath(CacheFolderName);
- return $"{root}/{packageName}/{CachedRawFileFolder}";
+ if (_cachedRawFileFolder.TryGetValue(packageName, out string value) == false)
+ {
+ string root = PathHelper.MakePersistentLoadPath(CacheFolderName);
+ value = $"{root}/{packageName}/{CachedRawFileFolder}";
+ _cachedRawFileFolder.Add(packageName, value);
+ }
+ return value;
}
///