2026-02-25 19:03:42 +08:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace YooAsset
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 清理所有缓存文件
|
|
|
|
|
/// </summary>
|
|
|
|
|
internal class EvictionAllPolicy : ICacheEvictionPolicy
|
|
|
|
|
{
|
2026-03-09 17:58:49 +08:00
|
|
|
/// <inheritdoc />
|
2026-02-25 19:03:42 +08:00
|
|
|
public EvictionResult SelectEvictionTargets(IReadOnlyCollection<ICacheEntry> cacheEntries, BCClearCacheOptions options)
|
|
|
|
|
{
|
2026-03-26 21:02:11 +08:00
|
|
|
var bundleGuids = new List<string>(cacheEntries.Count);
|
2026-02-25 19:03:42 +08:00
|
|
|
foreach (var entry in cacheEntries)
|
|
|
|
|
{
|
2026-03-26 21:02:11 +08:00
|
|
|
bundleGuids.Add(entry.BundleGuid);
|
2026-02-25 19:03:42 +08:00
|
|
|
}
|
2026-03-26 21:02:11 +08:00
|
|
|
return EvictionResult.CreateSuccess(bundleGuids);
|
2026-02-25 19:03:42 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|