Expand my Community achievements bar.

AEM Dispatcher eviction

Avatar

Level 2

Does anybody know when  as in with which kind of activation are files evicted in dispatcher?  At the moment I am not finding a clear pattern. And doesn't seems to be any documentation available.  Please do not refer me to another article in this community because there is no other addressing this properly.  

5 Replies

Avatar

Community Advisor

Hi @agriselli 

On Activation/Deactivation and Delete, all the files(including all the extension, selectors etc) at the same path are flushed/invalidate from dispatcher if flush agent is configured. Flush or Revalidate It depends on dispatcher config.


Which other files are deleted it depends on statfile config - https://medium.com/@bhargava.shalki/logic-of-stat-file-in-aem-dispatcher-a0ac254dccaf  

Arun Patidar

AEM LinksLinkedIn

Avatar

Level 2

I understand how stats file work, and when a file is invalidated. I want to understand when specifically a file is evicted, with the keyword being evicted. Not invalidated. According to adobe documentation invalidated and evicted are not the same thing. 

Avatar

Level 2

agriselli_0-1764736997277.png

This is what Adobe documentation says about cache eviction, but I am seeing evictions where there is space available and getting no explanation anywhere on how this is really supposed to work. 

Avatar

Employee

hello @agriselli 

Any activation (publish) from Author to Publish can trigger cache invalidation if the Dispatcher is configured to invalidate the activated path.

The /cache and /invalidate sections in dispatcher.any define which paths are automatically flushed. Some cache evictions occur only via explicit Dispatcher flush requests, either from AEM or manually (e.g., /dispatcher/invalidate.cache URL or curl).

For most files, Dispatcher marks cache files as stale after an activation; the actual file is refreshed or deleted only when requested again. Files are actively and immediately evicted only if an activation or flush explicitly matches the /invalidate rules.

Also double-check your /invalidate, /invalidateHandler, /statfileslevel, and /enableTTL configuration

Avatar

Level 6

Hi @agriselli ,

In AEM, dispatcher cache eviction happens only when AEM sends an activation (flush) request to the dispatcher. Files are not removed automatically — they are evicted only when a flush agent on the publish instance triggers an HTTP cache-invalidate call to the dispatcher.


Dispatcher evicts files when content is activated, deactivated, moved, deleted, or when a cache-flush is triggered. Any activation that updates or removes content under a cached path causes the dispatcher to invalidate that path or its parent folders according to /statfileslevel and your flush configuration.

So the pattern depends on:
The type of activation (publish, delete, move, deactivate).
Your dispatcher flush rules and statfile level.
Whether the flush agent successfully sends the invalidation request.
Dispatcher evicts cache only when a flush agent sends an activation-based invalidation — it never evicts on its own.