TTL using mod_expires in Dispatcher | Community
Skip to main content
Level 3
September 24, 2020
Solved

TTL using mod_expires in Dispatcher

  • September 24, 2020
  • 3 replies
  • 2262 views

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>

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 tamalb19521780

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. 


3 replies

joerghoh
Adobe Employee
Adobe Employee
September 24, 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.

arunpatidar
Community Advisor
Community Advisor
September 27, 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?

Arun Patidar
Level 3
September 29, 2020

Hi Arun,

You mean AEM code overriding apache TTL headers? 

 

Thanks

tamalb19521780
tamalb19521780Accepted solution
September 30, 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.