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:
- Preventing possible timing conflicts between AEM Dispatcher and the publish instance (see Invalidating Dispatcher cache from the Authoring Environment).
- The system includes several publishing instances that reside on high performance servers, and only one authoring instance.
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:
-
Open the AEM Tools console.
-
Open the required replication agent below Tools/replication/Agents on publish. You can use the Dispatcher Flush agent that is installed by default.
-
Click Edit, and in the Settings tab ensure that Enabled is selected.
-
(optional) To enable alias or vanity path invalidation requests select the Alias update option.
-
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 ofwww.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. -
Configure other parameters as required.
-
Log in to the publishing instance and validate the flush agent configuration. Also, make sure it is enabled.
-
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:
<publishserver> 13:29:47 127.0.0.1 POST /dispatcher/invalidate.cache 200