Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

Clear dispatcher cache programmatically from publisher in AEM 6.x

Avatar

Level 2


Hello Community.
First time here
We have a requirement in which we need to clear dispatcher cache without publishing the page. We tried flush service options but it is not working for us. Looking for solution options to achieve this.

Thank you

9 Replies

Avatar

Employee Advisor

When do you want to clear the cache programmatically? Please brief us about the event in publish instance based on that you want to clear the cache programmatically.

Avatar

Level 2

The solution is supposed to work by updating the cache often with  json-ld markup. These updates happen very dynamically and often too. Because of this, it is not feasible to publish the page manually so often. 
So, it is important that we are able to invalidate the dispatcher cache for content dynamically generated by our AEM connector. 
Did I explain clearly?

Avatar

Level 2

We have written functionality in which we receive requests (POST) from the third party to update the node data in Publisher, after updating we also need to invalidate/remove that page cache from the dispatcher.


As we are not publishing the page from Author to Publisher, we are looking for options to do it programmatically.
response...

Avatar

Employee Advisor

Understood. In that situation we can create Event handler or Event Listener which will be responsible to observe the change at node level on Publish instance.

Once it observes the change then it will clear the dispatcher cache programmatically from AEM publish instance.

 

But we need to make sure that Event Handling will work only for this use case.

You can follow this if you aren't using acs-commons.

 

Please review the section named: Example flush servlet at https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/page-invalid...

 

Avatar

Level 2

Thank you very much for the feedback.

Avatar

Community Advisor

Hi,

 

You can set dispatcher to have a ttl, check the below link

 

https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-ttl/index.html

 

Avatar

Level 2

Thank you for the feedback. We will try to se what works best.

Avatar

Community Advisor

Hi,

If you are using ACS common then use https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-flush-ui/index.html for clearing cache.

Arun Patidar

AEM LinksLinkedIn

Avatar

Level 2

Thanks a lot. I will try this.