Caching


(Joy) #1

What is the best way to clear the cache for public users to view updated documents/pages? I recently had to update importance documents/pages however public users couldn't see the updated content. Nor would they know how to use the _nocache.

 

I currently have a trigger set up to clear the Matrix cache when assets go live however this doesn't clear the browser cache.

If I set up a trigger to clear the Squid cache too will this solve this issue? Will there be any performance issues if I set this up?

 

Or is it best to manually clear the browser cache?

 

Still trying to get my head around all the different caches.

 

Thanks


(Marcus Fong) #2

If you have Squid and are using a trigger to clear Matrix cache, then you should also set up a trigger to clear Squid cache.

However, nothing you do in Matrix will clear the browser cache - it’s impossible to clear a user’s browser cache from the server.


What you can do instead is to set Browser Cache Expiry in the Cache Manager to something fairly low, such as 5 minutes (300 seconds). Then use the Accelerator Cache Expiry setting to control how long Squid caches content for.


(Tim Davison) #3

What Marcus says.  We set our browser cache to two minutes - usually that's enough time for the cache to expire while calling the stakeholder and saying "try now".  Make sure (as Marcus says) you also set the accelerator expiry - this is special instructions to the Squids on how long they should retain.   If not set it will use the default browser cache.  We set our Squids and Matrix cache to 24hrs and control with triggers.

 

Re: the triggers, we set the Matrix cache to clear whenever the asset is updated (not just status change).  This means it fires more often but captures more occasions when we might be changing something.  We also set up another trigger to clear the Squid cache whenever the asset is updated *and* whenever the Matrix cache is cleared for that asset.  This means the Squids will update if ever you manually _recache, even if you didn't change anything..