I want to cache json response in dispatcher for content as service in aem 6.5. For example, I want to cache http://localhost:4503/content/we-retail/us/en/men/jcr:content/root/text.model.json. the cache works here perfectly but when if author make a content change at page level, we would want to invalidate the cache for above /content/we-retail/us/en/men/jcr:content/root/text.model.json and fetch the content from publish and get cached. Is there any way make it work at node level ?
As per the design it works fine if we make any change at page level. Can we make the same behavior at node or component level (in this it is text component)
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @Mario248 ,
If your flush agent is working properly, cache for http://localhost:4503/content/we-retail/us/en/men/jcr:content/root/text.model.json should be invalidated as soon as you activate page http://localhost:4503/content/we-retail/us/en/men.html If it is not happening please check /invalidate section in your farm file and allow *.json. After adding this rule cache invalidation should work as expected. Please add rules as per your project.
/invalidate { /0000 { /glob "*" /type "deny" } /0001 { /glob "*.html" /type "allow" } /0002 { /glob "*.json" /type "allow" } }
Hi @Mario248 ,
Try this in /filter section of the dispatcher configuration
{ /type "allow" /url "/content/we-retail/us/en/men/jcr:content/root/text.model.json*" }
Hope that helps!
Regards,
Santosh
Hi @Mario248 ,
If your flush agent is working properly, cache for http://localhost:4503/content/we-retail/us/en/men/jcr:content/root/text.model.json should be invalidated as soon as you activate page http://localhost:4503/content/we-retail/us/en/men.html If it is not happening please check /invalidate section in your farm file and allow *.json. After adding this rule cache invalidation should work as expected. Please add rules as per your project.
/invalidate { /0000 { /glob "*" /type "deny" } /0001 { /glob "*.html" /type "allow" } /0002 { /glob "*.json" /type "allow" } }
Views
Likes
Replies