Hello,
Our AEM dispatcher cache becomes invalid as soon as any page is (re)published by an author. As we publish pages many times each hour, there is effectively little to no dispatcher page caching, and pages are rebuilt for each request. I can see the effect of this with the marked difference in response time during a period of no author publishing and just after.
Is this expected? Can't the cache be configured so that only the re-published page and those dependent on it are invalidated?
Thanks,
Stuart
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Stuart,
No, this is a very bad practice!
The dispatcher allow you to serve a very large number of request if the page is cached.
If you need to remove all cache for each author page publish, probably you are working on a full loggedin site which need to have really dynamic information. If you are working on a full loggedin site, probably you need to remove the caching directly from the dispatcher configuration; even if I can confirm you that also into some loggedin site (e.g. intranet) something could be cached in order to improve performance.
Let us know if you need more info.
Thanks,
Antonio
Hi Stuart,
You need to configure your dispatcher in order to align the cache management to your expectation.
Probably in your case you need to change the statfilelevel in order to clear the cache only for the subtree with depth which you decide.
Have a look on this documentation [0] [1] where you can find all the available configuration for dispatcher caching.
[1] Optimizing the Dispatcher cache
Let us know.
Thanks,
Antonio
The cache invalidation behavior can be controlled by /statfileslevel configuration in the farm file.
If you want to invalidate only the modified file then send additional Header CQ-Action-Scope: ResourceOnly as part of the flush agent request.
Regards
Albin I
Looks like you did not configure Dispatcher properly.
You might want to revisit the dispatcher cache configuration and check statfileslevel. Having said so , you can also Cache content for as long as possible and reduce requests that go back to AEM - Optimize flush requests by enabling refetching flush on all flush agents. Use /enableTTL and set Cache-Control: max-age=... header to cache files as long as possible.
Check doc - Optimizing the Dispatcher cache
Thanks all for the helpful information.
Is there any scenario where you would want to configure the dispatcher to invalidate the entire cache for every author page publish?
Views
Replies
Total Likes
Hi Stuart,
No, this is a very bad practice!
The dispatcher allow you to serve a very large number of request if the page is cached.
If you need to remove all cache for each author page publish, probably you are working on a full loggedin site which need to have really dynamic information. If you are working on a full loggedin site, probably you need to remove the caching directly from the dispatcher configuration; even if I can confirm you that also into some loggedin site (e.g. intranet) something could be cached in order to improve performance.
Let us know if you need more info.
Thanks,
Antonio
Views
Likes
Replies