I have a dispatcher set up with a fairly deep stats file level due to a particular project in a multi tenancy situation.
What I'm hoping is for a way to be able to recursively flush directories to mimic a more shallow stats file level for the other tenants.
Is there a dispatcher flush command that allows me to explicitly delete a directory of content?
To invalidate (or flush) the Dispatcher cache without activating a page, you can issue an HTTP request to the dispatcher. For example, you can create an AEM application that enables administrators or other applications to flush the cache. The HTTP request causes Dispatcher to delete specific files from the cache.
Which type of Replication Agent do you create to flush the Web server cache for a newly activated page? Create a Dispatcher Flush Agent.
How should a developer configure the replication agent to flush the dispatcher cache for a newly activated page? A. Set the serialization type property of the default agent to dispatcher flush.
The domain name system resolves the domain names to the IP address of the web server. The Dispatcher cache mirrors the directory structure of the AEM content repository. The file paths below the document root of the web server are the same as the paths of the files in the repository.
You could achieve this yourself by sending a simple GET request to your dispatcher. The path on the Dispatcher that you need to hit is /dispatcher/invalidate.cache
.
The following headers ensure that it's processed correctly:
The final curl command that you would build would then look something like:
curl -v \
-H "CQ-Action: DELETE" \
-H "CQ-Handle:/" \
-H "Content-Length: 0" \
-H "Content-Type: application/octet-stream" \
http://localhost:80/dispatcher/invalidate.cache;
(Where this is removing everything from the cache on a Dispatcher running under localhost on port 80. This backslashes here are optional, just making it easier to read)
You could issue this GET request from any box (subject to your firewall restrictions, etc.), for example, it could come from:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With