I’d like to set up a trigger that recaches a page on our webserver when it is made live.
We are using Redis cache, rather than squid or the matrix cache, so the actions to clear the matrix or squid cache don’t work. Our way of recaching a page is to add /_recache to the end of the url.
When I hardcode the address of a page, it works. What doesn’t work is when I pass in a keyword like %asset_url_path% as the url in the request (I’ve topped and tailed the path with the site domain and /_recache). Do keywords work in the Call Rest resource? If they do, would %asset_url_path% actually pick up the path of the asset creating the trigger?
Hi. Thanks for your reply. Yes this keyword works when the Call Rest Resource is a page in the site. However, I am calling it as a trigger action and it doesn’t appear to work there.
Keywords work there, but %asset_url_path% will only get you the path of the URL, not the full URL which is needed as that’s usually what’s stored as the cache key (not sure about Redis though). Have you tried using %asset_url%? ALso, what is your trigger event?
I have tried using https://www.domain.com%asset_url_path%/_recache as well as %asset_url%/_recache but no joy. I get the error Curl Error (3): '': malformed [REST0001].
The trigger event is when an asset status is changed to live.