Any way to delete cached asset bundle without deleting all the cache?

Let’s assume I have a bundle which weights like 100mb, and it might be updated on server. If it gets updated, a client re-downloads it (using WWW.LoadFromCacheOrDownload with a new version number). After a client finishes downloading, it knows for certain that previous version will no be longer needed and it can delete it (otherwise it will consume that 100mb for Caching.expirationDelay seconds). I can’t set expiration delay to some low number since it will affect other bundles as well.

Is there any way to delete it without deleting ALL the cache using Caching.CleanCache?

Still interested in that :slight_smile:

Yep yep, still interested. Anyone?
This seems to be a big flaw in caching system

I guess this is something that was never implemented using Unity’s caching system.

We just started working with asset bundles ourselves, and due to a number of reasons chose to implement our own caching mechanism. You could do the same yourself, starting bare bones with only a simple mechanism for storing the downloaded content to a folder on the device. This gives you access to managing the cache yourself (purging unneeded content, setting different policies for retaining data in cache,etc).

Yep, seems thats the only way to go. Pretty sad, though

It’s the feature we already planned, will get you guys updated.

@ Any updates? Or is it planned for Unity 6?

@ Any updates?

I need to clear the assetbundle cache — any ideas / follow up on this topic?

Create your own cache mechanism where you’ll have total control over everything.

Just do it yourself is rarely a viable solution with any sort of time pressure… it’s why we use an engine.
Plus, clearing a single reference from cache is an obvious necessity of a caching system.

4 Likes