max-age is configured, do i need to configure invalidate also in dispatcher | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Theo_Pendle

Hi @rohan07,

Cache-Control: max-age is a HTTP header that influences the cache duration in the client browser.

Dispatcher invalidation determines the cache duration of AEM content in the Dispatcher cache.

Technically speaking, the two things are not related, however you will need to configure both in order to have a performance-efficient and functional solution:

 

Please refer to the Adobe documentation on enabling TTL (Time To Live) on AEM and Dispatcher for more information. 

3 replies

Ravi_Pampana
Community Advisor
Community Advisor
May 24, 2020

Hi,

 

Related to browser max-age a new request will not be made to the server as the js/css/image is stored in the browser cache (client side). After the max-age it will try to get the response by hitting the Akamai/Dispatcher/Publisher. If the response is cached in Akamai/Dispatcher it will not go to publisher.

Theo_Pendle
Theo_PendleAccepted solution
Level 8
May 24, 2020

Hi @rohan07,

Cache-Control: max-age is a HTTP header that influences the cache duration in the client browser.

Dispatcher invalidation determines the cache duration of AEM content in the Dispatcher cache.

Technically speaking, the two things are not related, however you will need to configure both in order to have a performance-efficient and functional solution:

 

Please refer to the Adobe documentation on enabling TTL (Time To Live) on AEM and Dispatcher for more information. 

joerghoh
Adobe Employee
Adobe Employee
May 24, 2020

As already outlined by the others, the "Max-Age" headers influences caches more downstream from AEM, that means any well-configured intermediary, including CDNs, and also your browser should respect them.

 

Regarding dispatcher: In most cases it must not affect dispatcher at all. If the Max-Age has passed and clients reach back to your dispatcher, the dispatcher might deliver the same file again (with a new Max-Age header) if that file has not changed in the cache. Which is default if you invalidate your dispatcher cache on any change.

 

The situation is a bit different when you use the feature of TTL-based caching on the dispatcher. Because then your application delivers content, and you cannot invalidate the cache properly (typically because the invalidation logic would be too complex/demaning). In that case you enable that feature and let the dispatcher invalidate the files after a few minutes automatically, and refetches the files again from AEM.