New Images and Cache clearing triggers / Instant-live triggers


(Douglas (@finnatic at @waikato)) #1

Just wondering what other people’s practices are with supporting users who need to upload images, but don’t quite understand asset statuses let alone matrix and browser caching.

I’ve got two options suggesting themselves:

  • A trigger that clears the matrix cache on the site when then there’s a change to a site asset.

  • A trigger that makes new images live instantly.

The latter works well in another site, but I’d like to get the first working - only problem being that I need to clear the cache on the page that includes the image (presumably as a ‘parent’, but not necessarily).

Any thoughts, tips, ideas?


(Bart Banda) #2

What has that got to do with uploading an image? Or are you uploading an image that is used on the site asset? In that case the event should probably be on the image asset rather than the site asset right?

I’ve implemented this before, basically when users upload images via Edit+, just make them live straight away because we don’t need workflow on them.

You could potentially use the “Action on Other Assets” function of the Trigger Action to fire the cache clearing on all assets that have NOTICE links to the image?


(Douglas (@finnatic at @waikato)) #3

Hey Bart, my wording on the first example could have been better - really just a trigger to clear the cache on the asset when there’s a change to it. Our triggers tend to be setup site by site in our older Matrix instance.

The NOTICE links action on other assets is just what I was after. Thanks!


(Bart Banda) #4

Cool.

For others who are interested, check out the guide on the Matrix site: https://matrix.squiz.net/tutorials/2016/configuring-a-trigger-to-clear-the-cache-of-an-asset