AEM Dispatcher Cache not working, Expires Header being added | Community
Skip to main content
Level 2
March 21, 2024
Solved

AEM Dispatcher Cache not working, Expires Header being added

  • March 21, 2024
  • 2 replies
  • 1002 views

I am seeing an response header being added (Expires:Thu, 01 Jan 1970 00:00:00 GMT) in AEM publish for all the requests like clientlibs/page requests and images. This is preventing the responses to be cached from dispatcher and cdn.

 

I don't see this being set in code base or acs commons dispatcher configs being set

 

@arunpatidar  , @imran__khan

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 arunpatidar

Hi @pradeep_varmape 
Please dispatcher and DCN settings as well.

 

Try accessing page with Author, Publish, dispatcher and CDN urls, to check from where the headers is appended.

2 replies

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
March 21, 2024

Hi @pradeep_varmape 
Please dispatcher and DCN settings as well.

 

Try accessing page with Author, Publish, dispatcher and CDN urls, to check from where the headers is appended.

Arun Patidar
Jagadeesh_Prakash
Community Advisor
Community Advisor
March 21, 2024

Hi @pradeep_varmape 

 

Try Header unset Expires in dispatcher

 

<LocationMatch "^\/content\/dam.*\.(xml|css|eot|gif|ico|jpg|jpeg|js|png|svg|swf|ttf|woff|woff2|pdf|txt|mp4|mp3|ics)$">
Header unset Cache-Control
Header unset Expires
Header always set Cache-Control "max-age=0"
Header always set Surrogate-Control "max-age=0"
Header set Age 0
</LocationMatch>