Dispatcher cache clearing from publisher

shallur2858104

10-09-2019

Instead of making direct call from Author to Dispatcher to clear the cache, can there be a flow to directly clear cache from publisher to dispatcher. So, as soon as content it activated to publish, it send an HTTPS Flush call to dispatcher to clear the cache? Is it feasible. If not then why not?

Accepted Solutions (1)

Accepted Solutions (1)

kalyan_ramkuma1

11-09-2019

It’s recommended to use publish flush agent for more robust auto­invalidation because using author flush agent may cause the following issues:

The Dispatcher must be reachable from the authoring instance. If your network (e.g. the firewall) is configured such that access between the two is restricted this may not be the case.

Publication and cache invalidation take place at the same time. Depending on the timing a user may request a page just after it was removed from the cache and just before the new page is published. AEM now returns the old page and the Dispatcher caches it again. This is more of an issue for large sites.

Answers (9)

Answers (9)

abhaykumarm

11-09-2019

As folks already mentioned in this thread the flush agent should be configured on the publisher and most of the customer do it that way.

Still below are recommended approaches to set up dispatcher flush mechanism for AEM Applications -

1. Set up dispatcher flush agents on AEM Publisher instances. This can be enabled completely by following Adobe's documentation for setting up dispatcher flush agent in Publishers instance.

2. In case if your AEM application/sites have internal redirections/shortening the URLs etc., then you like to configure dispatcher flush rules (from ACS Commons) as part of your AEM project configs - Dispatcher Flush Rules

3. Now say you have a situation, where you need to clear full site cache but you don't have direct access to dispatcher servers but still you want to manage the dispatcher cache clear on your own without AEM admin help. In that case, you may like to configure dispatcher flush agent in AEM Author instance also and leverage Dispatcher Flush UI pages from ACS Commons - Dispatcher Flush UI  to clear dispatcher cache from AEM Author instance.

Hope above recommendations help in your use cases. Thanks.

jbrar

Employee

11-09-2019

Ideally, the flush agent should be configured on the publisher and most of the customer do it that way.

Under certain circumstances, performance gains can be made by transferring cache management from the authoring environment to a publishing instance. It will then be the publishing environment (not the AEM authoring environment) that sends a cache invalidation request to Dispatcher when a published page is received.

More details at [1]

[1] Invalidating Cached Pages From AEM

rachanam1547401

11-09-2019

I think recommended way to clear publish dispatcher cache is always from publisher via replication agent on publisher as oppose to author.

Not sure why do you need to clear publish dispatcher cache from author directly.

Regards,

Rachna

rachanam1547401

11-09-2019

Hi,

The way AEM works is, publisher sends flush call to dispatcher to either flush or rebuild the cache depending on replication agent serialization type.

If I understand your question correctly(it's asking about publish dispatcher and not author dispatcher), this is how AEM should work - 

Page is activated from author, as soon as it reaches to publisher, publisher sends flush/re-fetch call to dispatcher to either flush or rebuild it's cache for the activated page.

Regards,

Rachna

shallur2858104

11-09-2019

Thanks Kalyan and Rcahna!

Can someone from Adobe also confirm if it is ok to go ahead with sending dispatcher flush request from publisher instead of author?

If yes then we can go ahead with this approach.

shallur2858104

11-09-2019

Hi Rachna,

I asked this question to get the recommended approach to clear cache. What if I move my cache clearing logic from author to publisher. What impact would it have? Should I go ahead with it?