max-age is configured, do i need to configure invalidate also in dispatcher

Avatar

Avatar
Level 1
rohan07
Level 1

Likes

0 likes

Total Posts

5 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
rohan07
Level 1

Likes

0 likes

Total Posts

5 posts

Correct reply

0 solutions
View profile
rohan07
Level 1

23-05-2020

whats the impact of max-age related to client cache

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
Theo_Pendle
MVP

Likes

238 likes

Total Posts

251 posts

Correct reply

105 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 10
Ignite 1
View profile

Avatar
Validate 1
MVP
Theo_Pendle
MVP

Likes

238 likes

Total Posts

251 posts

Correct reply

105 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 10
Ignite 1
View profile
Theo_Pendle
MVP

24-05-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:

cache.png 

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

Answers (2)

Answers (2)

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,134 likes

Total Posts

3,161 posts

Correct reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,134 likes

Total Posts

3,161 posts

Correct reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

24-05-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.

Avatar

Avatar
Establish
MVP
Ravi_Pampana
MVP

Likes

197 likes

Total Posts

243 posts

Correct reply

75 solutions
Top badges earned
Establish
Contributor
Shape 1
Ignite 5
Ignite 3
View profile

Avatar
Establish
MVP
Ravi_Pampana
MVP

Likes

197 likes

Total Posts

243 posts

Correct reply

75 solutions
Top badges earned
Establish
Contributor
Shape 1
Ignite 5
Ignite 3
View profile
Ravi_Pampana
MVP

23-05-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.