Hello,
Dispatcher uses two types of cache invalidation mechanisms:
- TTL-based invalidation, but only if you configure
/enableTTL "1"
- Stat file-based invalidation
Stat file-based invalidation is the default behavior, which means Dispatcher will cache all configured paths/extensions until they are invalidated. Dispatcher cache invalidation happens when you publish new content from AEM author.
In case you want to use TTL-based caching in Dispatcher you need to set the appropriate cache headers on AEM Publisher. If you want to skip Dispatcher caching completely then add Dispatcher configuration to not cache those paths/extensions.
TTL-based invalidation
If Dispatcher farms have TTL enabled, the Dispatcher will check if the AEM publisher is sending any regular expiration headers from the HTTP standard.
If the headers contain a Cache-Control, max-age, or Expires date, an auxiliary, empty file next to the cached file is created, with the modification time equal to the expiry date. When the cached file is requested past the modification time, it is automatically re-requested from the backend.
Stat file-based invalidation
A “stat file” is an empty file, placed in the DOCROOT and its subsequent folders. Its primary purpose is to signal the Dispatcher that a cache invalidation or update is required. When the dispatcher detects changes in this file, it triggers cache refreshing processes, ensuring the latest content is served to users.
The /statfileslevel is defined in the invalidation.farm file under the /cache section.
Hope this helps,
Daniel