Dispatcher Flush Rules
Available since version 1.2.0
Define simple, yet powerful, rules for targetted flushing of files cached by Dispatcher.
How to Use
Create a new
sling:OsgiConfig node for each logical flush rule set. A good practice is to create a “global” configuration and separate configurations per “site”.
OSGi Config Properties
Defines the ReplicationActionType to use when issuing the chained replications.
INHERIT: Use the action type of the origin replication
ACTIVATE: Invalidates the cached files opposed to deleting
DELETE: Deletes the cached files opposed to invalidating
Defines the flush mappings in the format (the delimiter is
Introduced in 1.5.0, regex groups can be used to further dynamic behavior.
To flush all pages under
/content/mysite when an new DAM
jpg is replicated use
prop.rules.hierarchical=[ "/content/dam/.*\.(png|jpg)=/content/mysite" ]
or using the new regex grouping (v1.5.0) to flush site pages based on activations to corresponding site dam folders
prop.rules.hierarchical=[ "/content/dam/([^/]+)/.*\.(png|jpg)=/content/$1" ]
In this case the following activations would triggers the follow flushes:
`/content/dam/mysite/animals/dog.jpg` would flush `/content/mysite` `/content/dam/yoursite/animals/cat.jpg` would flush `/content/yoursite`
Defines the flush mappings in the (same as hierarchical) format
used to initiate “ResourceOnly” dispatcher flush requests.
**Note: To use ResourceOnly mappings, a second set of Dispatcher Flush Agents must be created with the exact HTTP Header
CQ-Action-Scope: ResourceOnly. **
These Flush Agents should also be configured as
One-to-Many Patterns-to-Flush Paths (Available in v1.9.2+)
Added in 1.9.2 (not 1.9.0), multiple flush paths can be assigned to a replication pattern. Each absolute path to flush is delimited by
Flushing from AEM 5.6+ Publish Servers
Dispatcher Flush Rules work from AEM 5.6 Publish Servers as well. Simple configure your Dispatcher Flush Agents on Publish to issue “On Trigger”. (It is likely this has been previously configured if you are already using Publish-side flushing).
Global Config Example
Delete the entire cache when a new package is activated.
On AEM 6.2 or above, this service uses a Service User for repository access. This user is configured with the expected permissions required, but additional permissions may be required if your repository design deviates from the expected structure.