Menu

Custom Dispatcher flush rule setup | acs commons

Create a custom dispatcher flush rule for your content, which an author can trigger using UI, without any involvement of developer and DevOps person. This is a single click activity for an author to invalidate the dispatcher cache.

For this ACS-commons provide a powerful which we need to configure in our AEM author instance. Here are the steps to set up the custom dispatcher flush using acs-commons.

 

Step 1: Log in to AEM instance.


Step 2: Download the acs-commons latest version from acs official site and install the acs-commons package in your AEM instance using AEM package manager [http://localhost:4502/crx/packmgr].


Step 3: After the successful installation of acs-commons, browse to AEM tools section. http://localhost:4502/miscadmin


Step 4: Now create a dispatcher flush page to set up your dispatcher configuration. Below is the screenshot.

1. Click on the Dispatcher Flush directory from the left rail.

2. Click on the new button from the menu bar, and select the option, New Page. As soon as you click on the New Page option a new window will appear. As highlighted below.

3. Put the Title and Name for the page. e.g. custom dispatcher flush

4. Click on the create button.

5. This will create a custom-dispatcher-flush page under the Dispatcher Flush directory.


Custom dispatcher flush

Step 5: Open this newly created "custom dispatcher flush" page. To open double click on the page name. Our custom dispatcher flush page will look like as below.

Custom dispatcher flush in AEM

Note: In the above screenshot we could see under the Active Dispatcher Flush Agent there is no active dispatcher flush replication agent is showing.

Step 6: Click on the Edit option from next to the Dispatcher Flush Configuration. Once we click on Edit, the configuration settings option will appear. Here we have to set the following;
1. Flush method - We need to specify whether we want to invalidate the caching or completely delete the caching from the dispatcher server.
2. Paths to flush - We will list all the path and pages which we want to invalidate or delete from the dispatcher server.

Dispatcher Flush Configuration- AEM dispatcher server

Step 7: Now we have to enable the Dispatcher Flush agent queue on AEM author. [http://localhost:4502/etc/replication/agents.author/flush.html]. If the AEM instance is already configured with dispatcher then we need not do anything extra in this case, just verify the Dispatcher Flush agent from the above-mentioned path. 

In case the dispatcher Flush is not setup then configure the following in properties in the configuration setting.

1. Edit the Dispatcher Flush settings. Click on the Edit button from the below screen.

2. Enabled - Check enabled option.

3. Move to the transport tab and set the following

a. URI - URL of the dispatcher server.

b. User - a transport user name

c. Password - password of transport user


Our dispatcher configuration is set, now using the Test Connection option we can verify the configuration setting and ensure everything is fine. 


Dispatcher Flush agent- AEM replication

Step 8: We have done with our custom dispatcher setup.

Step 9: Now go back to your custom dispatcher page which we had created in Step 4. Open the page and see the changes. In the dispatcher flush page now we could see Flush paths on Dispatcher button and Dispatcher Flush under Active Dispatcher Flush Agent.

Step 10: Click on Flush Paths on the Dispatcher button highlighted in red to invalidate and delete the caching from the dispatcher server. Below is the screenshot. After triggering the flush go and validate the status of the cached content.
 
Dispatcher flush
Dispatcher flush

References:

Adobe consulting services: 

No comments:

Post a Comment