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