In the “Invalidating Cached Pages from AEM” document on https://dev.day.com/docs/en/cq/current/deploying/dispatcher/page_invalidate.html, there is a brief section covering how to invalidate dispatcher cache manually. It only talks about sending HTTP requests to the dispatcher and it briefly touches on the format. So, where’s the quick (and dirty, if you will) command? Anything for me to copy and paste and get the job done?
Here you go:
curl -H "CQ-Action: Activate" \ -H "CQ-Handle: /content/bar" \ -H "Content-Length: 0" \ -H "Content-Type: application/octet-stream" \ http://_dispatcher-server-hostname_[:port]/dispatcher/invalidate.cache
Of course you will have to replace the content path and the host/port.
If you ever need a “hook” to get a custom set of files to be invalidated from the dispatcher, for whatever reason, put the above into a script in any *nix environments (where cURL is supported) should do the job for you. Oh, did I forget to mention that you can actually trigger a command from an AEM workflow? You get the idea