I have been searching and not seen this addressed, so forgive me if this is a duplicate question.
Our production promotion process involves a number of steps, the last of which is the clearing of the AEM Script Cache. So far, we have been able to automate every step of the deployment via Jenkins, but have been unable to determine if there is a way to automate/script this particular step.
Is this possible, and if so, can someone advise as to how to accomplish this?
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
That did not, unfortunately, provide any information about the script cache, but I was able to do some research and found the following solution. This curl command will submit the form on the script cache page and therefore clear it.
curl -u [admin login]:[admin password] -X POST --data-raw "script=all" http://localhost:4502/system/console/scriptcache
Views
Replies
Total Likes
Hello @RAMiesem1
Yes, you can use the curl command (like the one you used - no request body needed):
curl -u "<admin-user>:<admin-password>" \
-X POST "http://localhost:4502/system/console/scriptcache"
This is equivalent to clicking Sling → Script Cache Status => Clear Cache in /system/console and is safe to use from Jenkins as a post-deploy step
Views
Replies
Total Likes
AEM Script Cache can be cleared automatically via an HTTP POST to the Script Cache console. For example:
This is equivalent to manually clicking Sling → Script Cache Status → Clear Cache.
It can be safely added as a post-deployment step in Jenkins to fully automate the promotion process.
No request body or additional parameters are required.
This approach removes the last manual step and integrates cleanly into your CI/CD pipeline.
Views
Replies
Total Likes
Views
Like
Replies
Views
Likes
Replies
Views
Like
Replies
Views
Likes
Replies