🌟 Quote of the Day
"Sometimes you win, sometimes you learn."
Dispatcher Flush Agent
It is replication agent used to clear/invalidate cache from the Dispatcher whenever content is activated or deactivated.
Multiple Ways to Clear Cache on Dispatcher
-
Using AEM Dispatcher Flush Agent – Automatically clears cache when content is activated or deactivated.
-
Using ACS Commons – Provides additional tools and utilities to invalidate or flush dispatcher cache selectively.
-
Manual or Custom Code – Manually deleting cached files on the dispatcher or writing scripts to programmatically clear cache.
1. Dispatcher Flush Agent on Author
-
Not recommended in most cases.
-
Author instance is primarily for content creation, not for serving live traffic.
-
If configured, it can trigger cache invalidation on the dispatcher, but it may cause unnecessary load.
2. Dispatcher Flush Agent on Publish
-
Recommended approach.
-
Publish instance serves live content through the dispatcher.
-
Flush agent is triggered automatically whenever content is activated (published) or deactivated, clearing the relevant cache.
Steps to configure:
- Traverse to author instance. http://localhost:4502/sites.html/content
2. Click on Adobe Experience Manager icon → tools → Deployment → Replication as shown below:
3. Click on Agents on Author as highlighted below:
4. Select Dispatcher flush option as shown below:
5. Click on Edit option as highlighted below:
8. It will show below highlighted green color radio button on successful enable.
9. Click on Test Connection anchor link to verify connection in between dispatcher and author instance.
Inside
allowedClients we can allow specific IP addresses or IP ranges which are permitted to access the Dispatcher or AEM instance.13. home page will get deleted from the cache directory, as shown below, as soon as we publish the page.
🔹 Step-by-Step Flow After Publish/Activate
1. Author Instance (Content Created/Updated)
-
Author creates or edits a page, asset, or component.
-
When finished, the content is published (activated).
2. Replication Agent on Author
-
The replication agent sends the content from Author → Publish.
-
This includes the page/asset data, references, and metadata.
3. Publish Instance (Receives Content)
-
The content is stored in the Publish instance JCR.
-
Now, the publish instance has the latest version of that page/asset.
4. Dispatcher Flush Agent (on Publish)
-
A dispatcher flush agent is triggered automatically.
-
It tells the Dispatcher (cache layer) to clear or invalidate the old cache for that content.
5. Dispatcher (Cache Layer)
-
Dispatcher removes the outdated cached file(s).
-
The next time a visitor requests that page, Dispatcher fetches the fresh content from Publish and caches it again.
6. End User (Website Visitor)
-
Visitor requests the page (e.g., homepage).
-
Dispatcher serves the latest version that was just published.
-
✅ Website shows updated content instantly.
home page will get deleted from the cache directory, as shown below, as soon as we publish the page.
No comments:
Post a Comment