I am configuring dispatcher and doing some tests. I have set the statfileslevel as 7.
When I activate /content/we-retail/language-masters/en/products/women/shorts/candide-trail-short.html, the dispatcher touches all the stat files in content, we-retail, language-masters, en, products, women, shorts
Then I have accessed /content/we-retail/language-masters/en/products/men.html and men.html file in docroot was invalidated and pulled from publish server
When I accessed /content/we-retail/language-masters/en/products/men/coats/slopeside-coat.html, the cache is not invalidated and served from cache due to the fact that stat level is 7 and the statfile in /content/we-retail/language-masters/en/products/men/coats is not touched due to activation of /content/we-retail/language-masters/en/products/women/shorts/candide-trail-short
My question is why men.html is invalidated though it is not related to any content on /content/we-retail/language-masters/en/products/women/shorts/candide-trail-short and can we avoid this?
As these would be the highly viewed pages on the site, I want to avoid their invalidation when other page in the hierarchy is activated,
That is the default behavior of dispatcher to touch all .stat files starting from child to root.
1) Add Header CQ-Action-Scope:ResourceOnly
Invalidation (i.e. touching of .stat files) can be prevented by sending an additional Header CQ-Action-Scope: ResourceOnly. This can be used to flush particular resources without invalidating other parts of the cache, like JSON data that is dynamically created and requires regular flushing independent of the cache