Good morning,
on Aem I have a web portal with the following structure:
- my-project
- my-project/en
- my-project/en/page1
- my-project/en/page1/sub-page1
- my-project/en/page2
- my-project/en/page2/sub-page2
how can I remove the cache from the Dispatcher of the whole "web portal" and of the "clientlibs" by calling the "dispatcher / invalidate.cache" interface with the command "curl" ?
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
You can use the below curl command to clear the dispatcher cache.
curl -H "CQ-Action: Delete" -H "Content-Length: 0" -H "Content-Type: application/octet-stream" -H "CQ-Handle: /content/my-project" http://localhost/dispatcher/invalidate.cache
curl -H "CQ-Action: Delete" -H "Content-Length: 0" -H "Content-Type: application/octet-stream" -H "CQ-Handle: /etc.clientlibs/my-project" http://localhost/dispatcher/invalidate.cache
Regards
Jeevan
You can use the below curl command to clear the dispatcher cache.
curl -H "CQ-Action: Delete" -H "Content-Length: 0" -H "Content-Type: application/octet-stream" -H "CQ-Handle: /content/my-project" http://localhost/dispatcher/invalidate.cache
curl -H "CQ-Action: Delete" -H "Content-Length: 0" -H "Content-Type: application/octet-stream" -H "CQ-Handle: /etc.clientlibs/my-project" http://localhost/dispatcher/invalidate.cache
Regards
Jeevan
Hi @robertol6836527 ,
You can do it through postman. Paste the below CURL command in your curl script box of your postman and it will help.
curl -H "CQ-Action: Delete" -H "Content-Length: 0" -H "Content-Type: application/octet-stream" -H "CQ-Handle: /content/mymyproj" https://<host:port>/dispatcher/invalidate.cache
You could also check https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-flush-ui/index.html which might be useful for creating a CICD pipeline that cleans cache (we used it when we had no direct connection between CICD pipeline and dispatcher due some project limitations)