Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

can you please explain stat files? (dispatcher)

Avatar

Level 9

I'm just trying to understand .stat files (specifically /statfileslevel) and I don't understand this example provided by Adobe.

 

screenshot is from => https://experienceleague.adobe.com/en/docs/experience-manager-dispatcher/using/configuring/dispatche...

2025-05-01 22_35_37-Configuring AEM Dispatcher _ Adobe Experience Manager and 10 more pages - Profil.png

I actually thought that when if a page is republished/invalidated at level=4 (let's assume /statfileslevel = 6), then pages from level=4 and above are invalidated. The way I read Adobe's statement, it's says pages on levels 0 to 4 invalidated.

 

Can you please explain? Thanks!

 

PS: The way I understand "touched" is that the .stat file file modification date is updated to published date/time.

 

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

4 Replies

Avatar

Level 4

Hi @jayv25585659,

.stat files help Dispatcher know when to invalidate cached pages.
When you publish a page at level 4 and /statfileslevel = 6, Dispatcher touches the .stat at level 4.
When a user requests a page, Dispatcher checks .stat files from level 0 to 4.
If any are newer than the cached file, the cache is invalidated.

Adobe is right - it’s not that levels 0 to 4 are "invalidated", but that Dispatcher checks .stat files at levels 0-4 to decide if the page should be re-fetched.

Hope this helps.

 

 

 

Avatar

Community Advisor

Hi @jayv25585659,

/statfileslevelcontrols how deep into the content path the Dispatcher checks for the .stat file used to validate cached content.

  • A .stat file is a timestamp marker. When content is activated (published), this file’s timestamp updates, and Dispatcher compares it with the cache file’s timestamp to decide if the cache is still valid.

When a page is activated (republished), the Dispatcher updates the .stat file at the content path level matching the /statfileslevel. This update invalidates cached files at that level and below - because their timestamp is now older than the updated .stat file.

Let me explain you with the real example

Assume your site structure is:

/content/mysite/en/products/item.html

This path has 6 segments:

1: content  2: mysite  3: en  4: products  5: item.html

Let’s say:

  • /statfileslevel = 4

  • You publish /content/mysite/en/products/item.html

Result:

  • Dispatcher updates .stat file at level 4: /content/mysite/en/products/.stat

  • Any cached content under or at level 4 (like /products/item.html) gets invalidated on the next request (because its cache timestamp is now older than the .stat file).

  • Content above level 4 (like /en.html, /mysite.html) is not invalidated.


Similar explaination I have given here with different scenario: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/what-is-the-best-approach-...

Hope that helps!


Santosh Sai

AEM BlogsLinkedIn


Avatar

Community Advisor

Hi @jayv25585659 ,

What Are .stat Files in Dispatcher?

.stat files are timestamp markers created by the Dispatcher. When content is published, AEM triggers the Dispatcher to "touch" (i.e., update the modified timestamp of) a .stat file.

This is how Dispatcher knows whether cached content is stale.

How /statfileslevel Works

Key Concept:

When a request is made, Dispatcher compares the timestamp of the cached file with the timestamps of .stat files along the path.

How It Works (Step-by-Step)

Let’s say a page is requested:

/content/mysite/en/products/item.html
This has 6 path segments:

/content

/content/mysite

/content/mysite/en

/content/mysite/en/products

/content/mysite/en/products/item.html

Now assume this Dispatcher config:
/statfileslevel = "4"

What Dispatcher Does:

It checks for .stat files from level 0 to level 4, meaning:

/

/content

/content/mysite

/content/mysite/en

/content/mysite/en/products

 

If any of these .stat files is newer than the cached file, Dispatcher invalidates the cache and fetches fresh content.

Clarification on Example

You said:

"I actually thought that when a page is republished at level=4 (with /statfileslevel = 6), pages from level=4 and above are invalidated."

The confusion is in what "invalidated" means:

Dispatcher doesn't delete cached pages.

It checks .stat files up to /statfileslevel to decide if cached content should be served or refreshed.

So when Dispatcher "checks levels 0 to 4" — that's true because it's checking .stat files from the root to the level of the activated page to determine freshness.

Pages below the touched level are implicitly invalidated (by timestamp). Pages above the touched level are not affected.


Example Summary

Let’s say:

You publish: /content/mysite/en/products/item.html

/statfileslevel = 4

Then:

Dispatcher touches .stat at /content/mysite/en/products (level 4)

When /content/mysite/en/products/item.html is next requested:

Dispatcher checks .stat files at levels 0 to 4

If any are newer than the cached page, it invalidates and re-fetches

Note:

.stat files are not deleted; they're timestamped.

Dispatcher does not walk directories recursively; it only looks up to /statfileslevel levels in the path.

Higher /statfileslevel = more fine-grained invalidation, but potentially more .stat files and disk I/O.


Regards,
Amit

Avatar

Community Advisor

@jayv25585659 : Please refer to https://techrevel.blog/2023/08/23/demystifying-the-aem-dispatcher-a-comprehensive-guide-to-the-basic...

 

If explains .stat files and dispatcher flush. refer to section "1. Content Invalidation:"


Aanchal Sikka