You can achieve this yourself by sending a simple GET request to your dispatcher. The path on the Manager you need is /dispatcher/invalidate.cache .
The following headers guarantee proper processing:
- CQ-Action: To delete content, it can be set to "DELETE". I think that "EXPIRE" also works to mark content as outdated, but not physically remove it from the cache.
- CQ-Handle: Indicates what needs to be deleted, starting from the root folder of your cache. For instance. "/ content / geometrixx" will remove geometrixx and everything below it. "/" will delete everything in the cache.
- Content-Length and Content-Type: Verify that the request is processed correctly. Since we are not sending the body, the length can be set to 0. Content-Type can be "application / octet-stream" (did not try other values).
The last curl command you built will look something like this:
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 removes everything from the cache on the Dispatcher running under the local host on port 80. These traces are optional here, they just make reading easier)
You can send this GET request from any field (subject to the limitations of your firewall, etc.), for example, it can be obtained from:
- your CI build agent
- scheduled task in publication instance
- An administrative component in an Author instance that accepts a given path for cleaning.
source share