[SOLVED] How to remove old cached assets?

Hi everyone, I have a question for you. How can i remove an asset that is no longer inside the addressable group from cache? For testing,

  • I created an Addressable group called “TestAssets”. Added a file named “testfile1” and downloaded it with Addressables.DownloadDependenciesAsync("testfile1") on device. I am using Unity CCD for remote.

  • Then i removed “testfile1” and added another file inside “TestAssets” group called “testfile2”. Re-uploaded bundle to bucket and downloaded “testfile2” with Addressables.DownloadDependenciesAsync("testfile2") on device.

  • Now, device has both “testfile1” and “testfile2” cached, however; since “testfile1” is not seen in catalog anymore, Addressables.ClearDependencyCacheAsync("testfile1"); not works.

In that situation, how can i remove old cached asset “testfile1” from cache without removing “testfile2” ? Hope I explained everything well :slight_smile:

EDIT
You can achieve this result with Addressable Group Settings → Cache Clear Behaviour → “Clean When New Version Loaded” option. It removes old bundle cache automatically.