Expand my Community achievements bar.

SOLVED

AEM Dispatcher Cache not working, Expires Header being added

Avatar

Level 2

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @pradeep8910 
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

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi @pradeep8910 
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

Avatar

Community Advisor

Hi @pradeep8910 

 

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>