TTL using mod_expires in Dispatcher

Avatar

Avatar
Boost 3
Level 2
Antony6790
Level 2

Likes

3 likes

Total Posts

21 posts

Correct reply

1 solution
Top badges earned
Boost 3
Ignite 1
Give Back
Boost 1
Affirm 1
View profile

Avatar
Boost 3
Level 2
Antony6790
Level 2

Likes

3 likes

Total Posts

21 posts

Correct reply

1 solution
Top badges earned
Boost 3
Ignite 1
Give Back
Boost 1
Affirm 1
View profile
Antony6790
Level 2

24-09-2020

Hi all,

 

We are in AEM 6.5.4 with Dispatcher 4.3.2. We are having mulitple sites and maintaining seperate vhost file for each site. Infront of our sites we have CDN.

 

For  TTL, we added below settings in vhost files and we are getting cache-control:max-age=1200 in response headers for all sites except 1 site.

 

For the site which cache-control is not coming up, we have reviewed and compared TTL settings and CDN settings but everything looks same. However for that one site, we are not getting cache control header.

 

Any help/inputs to identify the issue will be very helpful.

 

<IfModule mod_expires.c>
        <filesMatch "\.(eot|gif|ico|jpeg|jpg|gif|png|svg|swf|ttf|woff|woff2|pdf|doc|docx|ppt|pptx|bmp)$">
                      ExpiresActive On
                       ExpiresDefault "access plus 20 minutes"
       </filesMatch>
      <filesMatch "\.(css|js|txt|html|xml)$">
                  ExpiresActive On
                  ExpiresDefault "access plus 20 minutes"
     </filesMatch>
</IfModule>

Accepted Solutions (0)

Answers (3)

Answers (3)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

27-09-2020

do you have some code for that side that possibly can override the response header? can you check dispatcher settings as well fro allowed header?

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-09-2020

I am not aware of any reason why it should behave differently. There is likely some configuration which you haven't checked and which makes the difference.

You should work systematically down and check with curl the CDN and then each publish instance if the headers are missing or not.

Avatar

Avatar
Level 1
tamalb19521780
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile

Avatar
Level 1
tamalb19521780
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile
tamalb19521780
Level 1

30-09-2020

Hi Antony6790,

If you have CDN in front of Dispatcher then there is possibility also CDN is setting the TTL from their end. So, ideal way to check any such implementation from your origin. Like if you have AWS LB then check using that what your dispatcher sending, otherwise, if you don't have any LB in front of Dispatcher in that case check first using dispatcher url in browser what response you are getting.
If you see, there is difference like your LB or Dispatcher url giving right TTL, then you can go back to CDN ( Akamai or limelight or anything you are using) and ask them to remove their setting and listen whatever origin is sending.