difference between invalidate and statfileslevel
Hi Team ,
Can you explain difference between two properties named "invalidate" and "statfileslevel" in AEM cache section please ..
Hi Team ,
Can you explain difference between two properties named "invalidate" and "statfileslevel" in AEM cache section please ..
Hi @jakecham
The /invalidate property defines the documents that are automatically invalidated when content is updated. With automatic invalidation, Dispatcher does not delete cached files after a content update, but checks their validity when they are next requested. Documents in the cache that are not auto-invalidated remain in the cache until a content update explicitly deletes them.
Automatic invalidation is typically used for HTML pages. HTML pages often contain links to other pages, making it difficult to determine whether a content update affects a page. To make sure that all relevant pages are invalidated when content is updated, automatically invalidate all HTML pages.
configuration example looks as follows
/invalidate
{
/0000 { /glob "*" /type "deny" }
/0001 { /glob "*.html" /type "allow" }
/0002 { /glob "*.zip" /type "allow" }
/0003 { /glob "*.pdf" /type "allow" }
}
Use the /statfileslevel property to invalidate cached files according to their path
Dispatcher creates .statfiles in each folder from the docroot folder to the level that you specify. The docroot folder is level 0.
Files are invalidated by touching the .stat file. The .stat file’s last modification date is compared to the last modification date of a cached document. The document is re-fetched if the .stat file is newer.
When a file at a certain level is invalidated, all .stat files from the docroot to the level of the invalidated file or the configured statsfilevel (whichever is smaller) are touched.
Reference : https://www.aemrules.com/2020/04/dispactherhacks-statfile.html
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.