Hello All,
I’d like some advice on Matrix Caching please! I’ve only been using Squiz for a couple of weeks so please forgive me if I’ve missed something obvious.
I have a page on my website where the user makes a selection and a cookie is set. I am reading this cookie using the %globals_cookie_cookiename% variable. I’m using the value of this cookie variable to do two things – output directly in a textarea and as a dynamic event source in an event listing (so I have a Replace Event Source > Set Value > %globals_cookie_cookiename%). These two elements (text and event list) are displaying on every page of the website. This is all working as expected. However (!), in some browsers the value of the cookie variable is not being reflected in the event listing until the _nocache suffix (or a control F5) is used (obviously only on previously visited pages). I want to tell squiz not to cache these assets and always read them directly from the server.
To test this I’ve tried two things:
- I’ve gone into Cache Manager and basically tried to turn it off for everything (just to prove that stopping squiz caching will solve this). I have caching status set to off and cache expiry set to 0 and all cache levels set to off and the cachable root URL crossed out. This hasn’t helped.
- I’ve created a trigger of Asset Accessed > Condition of my cookie asset being accessed > Action of Clear Matrix Cache (Ignore Permissions, Include Current Asset, Asset ID of my event listing). I’ve also set this for Clear Squid Cache too. This didn’t work. I then added the site root asset ID to be cleared too but alas, as you’ve probably guessed by now, it didn’t work.
Basically I need to be able to:
- Switch off any caching of a particular assetID (so that my event list always reads fresh from the server)
OR
- Actively deny caching altogether
OR
- Set a trigger saying that when my Cookie asset is accessed then do a _nocache for that user on all pages on the site in their browser cache.
Firefox, naturally, is behaving perfectly. IE, naturally, is being a pain. Surprisingly, Safari and Chrome are also partly misbehaving.
Any ideas are gratefully received.
Thanks
Paul