Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Dispatcher and Cache-Control mod_expires

cecheta
Level 2
Level 2

In the release notes for Dispatcher v4.3.3, it mentions an improvement:

  • DISP-818 - mod_expires adds Cache-Control headers for uncacheable content

Does anyone know what this improvement actually does? We are trying to use the Apache mod_headers to add Cache-Control to certain responses, but it does not work if the request contains query parameters. If we remove the query parameters from the request, or we change the cache-control header to another header (like cache-control2) then it works.

https://docs.adobe.com/content/help/en/experience-manager-dispatcher/using/getting-started/release-n...

1 Accepted Solution
aemmarc
Correct answer by
Employee
Employee

May want to log a ticket.

 

DISP-818 removed the Cache-Control header from requests with query parameters

 

BUT -- this introduced some unintended things which are currently being handled under the open JIRA GRANITE-29891

 

 

View solution in original post

6 Replies
Jörg_Hoh
Employee
Employee

Actually the mod_expires always added headers to any response, even if this response was supposed to be uncacheable.

And technically (according to the RFCs) any request containing a query string must not be cached.

 

HTH,

Jörg

cecheta
Level 2
Level 2
Yes, we are trying to add cache-control: max-age=0, no-cache, no-store, must-revalidate so that the CDN does not cache the page, but the header is missing from the response when we try to set it using th
rajput-ankur
Level 1
Level 1

@Jörg_HohIn my case it is still not adding Cache-Control for uncacheable (denied in cache.any) request.

I have used

ExpiresByType application/javascript "access plus 1 month"

 But as soon as I add the entry to deny caching, the Cache-Control header gets removed from the final response.

Jörg_Hoh
Employee
Employee
Cache Control headers are different from Expiration headers, and IIRC they can co-exist do not influence each other.
cecheta
Level 2
Level 2

@Jörg_Hoh Yes, we are trying to add cache-control: max-age=0, no-cache, no-store, must-revalidate to the response so that the CDN does not cache the page, but the cache-control header is missing from the response when we try to set it using the Header directive.

aemmarc
Correct answer by
Employee
Employee

May want to log a ticket.

 

DISP-818 removed the Cache-Control header from requests with query parameters

 

BUT -- this introduced some unintended things which are currently being handled under the open JIRA GRANITE-29891

 

 

View solution in original post