I am trying to write a servlet to invalidate cache and the code is not working as the distribution request is not working
@Reference
private Distributor distributor;
ResourceResolver resolver = ...; // the resource resolver used for authorizing the request
String agentName = "publish"; // the name of the agent used to distribute the request
String pathToInvalidate = "/content/to/invalidate";
DistributionRequest distributionRequest = new SimpleDistributionRequest(DistributionRequestType.INVALIDATE, false, pathToInvalidate);
distributor.distribute(agentName, resolver, distributionRequest);
This is the reference code I am working on
Solved! Go to Solution.
Views
Replies
Total Likes
@Kaartikn Please share the Stacktrace for troubleshooting. Hopefully you are not testing it locally, but on a AEMaaCS Environment.
Whole process is defined in below link:
This should help
if possible pass the stack trace
@Kaartikn Please share the Stacktrace for troubleshooting. Hopefully you are not testing it locally, but on a AEMaaCS Environment.
Whole process is defined in below link:
This should help
I am trying to do the same on the RDE in a Sandbox program, and it doesn't work.
There is no stacktrace.
The publish server receives the request and issues the one for the dispatcher (see the zipped log attached). The dispatcher receives the request, but still returns the cached content until the "max-age" expires (see the screenshot attached for the cached and non-cached output).
Views
Replies
Total Likes
Views
Likes
Replies