Hi @nitrohazedev ,
- Publication and cache invalidation take place at the same time. Depending on the timing a user may request a page just after it was removed from the cache and just before the new page is published. AEM now returns the old page and the Dispatcher caches it again. This is more of an issue for large sites.
- Hitting by queryString param will not clear cache but serves the content from publisher.
For more details to check what is missing please check these article having 4 steps to get it done: https://sourcedcode.com/blog/aem/how-to-setup-the-aem-dispatcher-flush-agent
Additionally, you can invalidate the dispatcher cache manually: https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/page-invalidate.html?lang=en#:~:text=To%20invalidate%20(or%20flush)%20the,specific%20files%20from%20the%20cache.
Question about about your /statfileslevel It depends on your project structure please check Invalidating Files by Folder Level how it works: https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-configuration.html?lang=en#invalidating-files-by-folder-level
Only resources along the path to the invalidated file are affected. Consider the following example: a website uses the structure /content/myWebsite/xx/. If you set statfileslevel as 3, a .statfile is created as follows:
- docroot
- /content
- /content/myWebsite
- /content/myWebsite/*xx*
When a file in /content/myWebsite/xx is invalidated then every .stat file from docroot down to /content/myWebsite/xxis touched. This would be the case only for /content/myWebsite/xx and not for example /content/myWebsite/yy or /content/anotherWebSite.
Hope that helps!
Regards,
Santosh