April 27, 2020
Estimated Post Reading Time ~

How to invalidate the dispatcher cache for dam assets referred from multiple sites?

Sometimes, we may have a scenario like the same DAM asset is referred from multiple sites and cached locally(site-specific) in AEM dispatcher for the different sites. The local cache of the different sites should be invalidated whenever the asset is modified.

This post will explain how to achieve the above-mentioned scenario.

Create a user in all the publisher and provide only the access to the DAM- /content/dam


Create a flush agent for individual sites with the following details in all the publishers(repeat the below step for all the sites)







Agent user Id: Specify the user created in the first step
URI: Specify the URL with a dispatcher server name
HTTP headers: Specify the site name(DNS for the site) as Host and specify CQ-Action-Scope: ResorceOnly(this will inform the dispatcher to only invalidating the dam asset by deleting it and not touching the .stat file)

Now, whenever the asset is modified all the local cache will be invalidated.


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.