As per our requirements we are caching the pages in dispatcher like this format ex :- /content/eacom0/en_us/help/Sam_Test_Availability_Alpha_Beta_Demo/jcr:content.-1.json .
The problem here is I am not able to invalidating the jcr:content.-1.json by using the dispatcher configurations.
Any suggestions or solutions for this.
Thanks In Advance. :)
Have you read all of the AEM documentation:
I have tried everything except the sling Servlet.
Does there any way to handle via the configurations instead of the servlet. ?
What do you mean with "I am not able to invalidate ..."? What have you tried? Can you set the dispatcher on loglevel DEBUG and post the relevant logs then?
We are caching the pages using JSON format like this /jcr:content.-1.json .
After publishing of the page , we are able to cache dispatcher but when we do modifications and reactivated the page it suppose to clean that cache at the time of reactivation (by using the triggers in publisher agents).
But what is happening its not invalidating/clearing the cached JSON in dispatcher , The result is we are unable to get the latest changes . We always getting the first one.
With same configurations We are able to invalidate the .html in dispatcher after the reactivation of the pages.
I hope you understand the situation :)
Can you share the /invalidate section of your dispatcher.any configuration and the dispatcher log entries...
Here is my invalidation configuration in dispatcher.
# Consider all HTML files stale after an activation.
Actually, JSON caching isn't done the way you have http request. Just clarify this is your request..*/jcr:content/.-1.json but caching folder is _jcr_content
So, just try URL like this in invalidating section. One more thing, Just guessing that Dot could be an issue but not sure. it is symbol for hidden files.
I am able to solve this problem with use of POST servlet .
HttpClient client = new HttpClient();
PostMethod post = new PostMethod("http://"+host+uri);
// post.addRequestHeader("Content-Type", "application/json");
StringRequestEntity body = new StringRequestEntity(page,null,null);