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?
It’s recommended to use publish flush agent for more robust autoinvalidation 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.
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.
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.