Any reason not to use "Cache Clear Behavior = Clear When When New Version Loaded"?

This is probably a dumb question, but why or when shouldn’t I use the “Clear When When New Version Loaded” setting?

My thought on this is when a new bundle was downloaded, the old bundle isn’t needed anymore. When the old bundle is kept, it causes the “app size” on the device to grow for no beneficial reason.

What am I missing?

  • When should I use “Clear When When New Version Loaded”?
  • When should I use “Clear When Space Is Needed In Cache”?
1 Like

Okay, watching this thread for insight. We have been using “clear when new version is loaded” exclusively so far as the other setting did not work with our remote addressables content updates at all…

I would actually like to hear some thoughts from the developers on it. @TreyK-47

1 Like

I’ll kick this to the team for some insight!

1 Like

I switched to clear on new version today. Couldn’t see a reason I wouldn’t want it.

The main reason being, I don’t see a way for it to even use the previous versions if I wanted too without explicitly loading an older version of the catalog

Hey all, just wanted to say that typically you would want to use “Clear When When New Version Loaded”. The main reason you might not want to use it is if you were in a performance critical area of code. The engine side clearing of the cache is synchronous.

But, as far as “why isn’t this the default”, it mainly has to do with us our aversion to changing pre-existing default behaviors. We try to make sure we’re not going to break expected behavior if a user upgrades.

In regards to the other version not working after doing a content update I’d have to see what your Caching settings were. By default, the Cache is an LRU cache. It could be that the engine side Caching still thought there was room and so didn’t eject anything, or perhaps some files were getting ejected but not the older version of Bundle A, but instead it was Bundle C (which could be still valid) but just hadn’t been used in a very long time.

1 Like