Invalidating Dispatcher Cache from a Publishing Instance

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

Such circumstances include:

NOTE
An experienced AEM administrator should make the decision to use this method.

A replication agent operating on the publish instance controls the Dispatcher flush. However, the configuration is made in the authoring environment and then transferred by activating the agent:

  1. Open the AEM Tools console.

  2. Open the required replication agent below Tools/replication/Agents on publish. You can use the Dispatcher Flush agent that is installed by default.

  3. Click Edit, and in the Settings tab ensure that Enabled is selected.

  4. (optional) To enable alias or vanity path invalidation requests select the Alias update option.

  5. On the Transport tab, access Dispatcher by entering the needed URI.
    If you are using the standard Dispatcher Flush agent, update the hostname and port; for example, http://<dispatcherHost>:<portApache>/dispatcher/invalidate.cache

    Note: For Dispatcher Flush agents, the URI property is used only if you use path-based virtual host entries to differentiate between farms. You use this field to target the farm to invalidate. For example, farm #1 has a virtual host of www.mysite.com/path1/* and farm #2 has a virtual host of www.mysite.com/path2/*. You can use a URL of /path1/invalidate.cache to target the first farm and /path2/invalidate.cache to target the second farm. For more information, see Using Dispatcher with Multiple Domains.

  6. Configure other parameters as required.

  7. Log in to the publishing instance and validate the flush agent configuration. Also, make sure it is enabled.

  8. Repeat for every publish instance affected.

After configuring, when you activate a page from author to publish, this agent initiates a standard replication. The log includes messages indicating requests coming from your publish server, similar to the following example:

  1. <publishserver> 13:29:47 127.0.0.1 POST /dispatcher/invalidate.cache 200