What is a Dispatcher?
Dispatcher is Adobe Experience Manager’s caching and/or load balancing tool. Dispatcher also helps to protect your AEM server from attack.
The Dispatcher helps realize an environment i.e both fast and dynamic. It works as a part of a static HTML server, with the aim of :
Storing as much of the site content as is possible, in the form of static website.
Accessing the layout as little as possible.
For caching, the Dispatcher module uses the Web server’s ability to serve static content. The Dispatcher places the cached documents in the document root of the Web server.
How Dispatcher Performs Caching ?
The Cache Directory
For caching, the Dispatcher module uses the web server’s ability to serve static content. The Dispatcher places the cached documents in the document root of the web server.
Methods for Caching
Methods for Caching - Content Updates
It deletes the modified file(s) from the cache.
It deletes all files that start with the same handle from the cache.
It touchesthe so-called statfile ; this updates the timestamp of the statfile to indicate the date of the last change.
Content Updates are typically used in conjunction with an authoring system which “knows” what must be replaced.
Files that are affected by a content update are removed, but Not Replaced immediately.
You may have several statfiles, If a page is updated, AEM looks for the next parent folder containing a statfile, and touchesthat file.
Methods for Caching - Auto-Invalidation
Invalidates parts of the cache – without physically deleting any files.
if the cached document is newer, the Dispatcher returns it.
if it is older, the Dispatcher retrieves the current version from the AEM instance.
Auto invalidation is typically used when the inter-relations are complex.
Auto-invalidation does not involve any action by the dispatcher at update time, except for touching the statfile.