April 27, 2020
Estimated Post Reading Time ~

Invalidate dispatcher cache after successful Jenkins build - AEM/Adobe CQ5

This post will explain how to invalidate the cache in Adobe Experience Manager after a successful Jenkins build.

Login to Jenkins console
Open the job and click on the configuration
Add post-build step of type “Execute Shell” and select “Run only if the build succeeds”



Enter the below script and click on - Change the dispatcher hostname accordingly.

/usr/bin/curl -H "CQ-Action: DELETE" -H "CQ-Handle:/" -H "Content-Length: 0" -H "Content-Type: application/octet-stream" --noproxy .com http://<<dispatcher host name>>/dispatcher/invalidate.cache


If multiple dispatchers is configured then configure the dispatchers as shown below in the script.

/usr/bin/curl -H "CQ-Action: DELETE" -H "CQ-Handle:/" -H "Content-Length: 0" -H "Content-Type: application/octet-stream" --noproxy .com http://{dispatcher1, dispatcher2, dispatcher3, dispatcher4}.com/dispatcher/invalidate.cache


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.