Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

TTL using mod_expires in Dispatcher

Avatar

Level 2

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>

1 Accepted Solution

Avatar

Correct answer by
Level 1

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. 


View solution in original post

5 Replies

Avatar

Employee Advisor

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

Community Advisor

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?



Arun Patidar

Avatar

Level 2

Hi Arun,

You mean AEM code overriding apache TTL headers? 

 

Thanks

Avatar

Correct answer by
Level 1

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.