public override void Dispose() { base.Dispose(); _fileCache = null; AssetInfo = null; _onLoadingComplete = null; }
public VersionedDiskCachedResourceWorker(AssetFileInfo assetInfo, string uri, Action <VersionedDiskCachedResourceWorker> onLoadingComplete, ICoroutineManager coroutineManager, IAntiCacheUrlResolver antiCacheUrlResolver, WebRequestSettings webRequestSettings = null) : base(uri, null, coroutineManager, antiCacheUrlResolver, webRequestSettings) { AssetInfo = assetInfo; _onLoadingComplete = onLoadingComplete; _isLoadFromFileCache = false; }
public VersionedDiskCachedResourceWorker(string uri, AssetFileInfo assetInfo, ICache <byte[]> fileCache, Action <VersionedDiskCachedResourceWorker> onLoadingComplete, ICoroutineManager coroutineManager) : base(uri, null, coroutineManager, null) { AssetInfo = assetInfo; _fileCache = fileCache; _onLoadingComplete = onLoadingComplete; _isLoadFromFileCache = true; }
private void RemoveOldResourceFromDiskCache(AssetFileInfo resourceInfo) { if (resourceInfo.version > 0) { var oldVersionREsources = resourceInfo.GetOldVersionedResourceName().ToList(); for (int i = 0; i < oldVersionREsources.Count; i++) { oldVersionREsources[i] = UrlHelper.GetUriWithPrefix(SupportsMask, oldVersionREsources[i]); } _memoryCache.ReleaseResources(null, oldVersionREsources); _fileCaching.ReleaseResources(null, oldVersionREsources); } }