Dispatcher returning cached site third time, not second time | Community
Skip to main content
October 16, 2015
Solved

Dispatcher returning cached site third time, not second time

  • October 16, 2015
  • 1 reply
  • 616 views

So I have some strange issue with the dispatcher. 
The first time I load a page it returns the following header:

Accept-Ranges:bytes clusternode:2 Connection:close Content-Encoding:gzip Content-Type:text/html; charset=UTF-8 Date:Thu, 05 Feb 2015 10:22:21 GMT ETag:W/"1c0007-2ec7e-50e54adf60226" Last-Modified:Thu, 05 Feb 2015 10:22:22 GMT Server:Apache Transfer-Encoding:chunked Vary:Accept-Encoding,User-Agent X-Frame-Options:SAMEORIGIN, SAMEORIGIN

And when I request the page the second time I get the following header:

Accept-Ranges:bytesCache-Control:max-age=1800clusternode:2 Connection:close Content-Encoding:gzip Content-Type:text/html; charset=UTF-8 Date:Thu, 05 Feb 2015 10:22:45 GMT ETag:"1c0007-2ec7e-50e54adf60226"Expires:Thu, 05 Feb 2015 10:52:45 GMTLast-Modified:Thu, 05 Feb 2015 10:22:22 GMT Server:Apache Transfer-Encoding:chunked Vary:Accept-Encoding,User-Agent X-Frame-Options:SAMEORIGIN, SAMEORIGIN

The page has no changes between responses, and as you can see I do not get cache control, nor expires tag even though I get the same ETag in both responses.

The problem is that the browser only requests If-None-Match header after the second time, not after the first time, therefore it pulls the whole page again the second time, and not requesting the cached one.
Any ideas what might me causing this?

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 Sham_HC

The header cache-control, Expires are not controlled by aem or dispatcher out of the box. Nor dispatcher  pay attention to those headers or modify internally. Check with webserver or cdn configuration.

1 reply

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

The header cache-control, Expires are not controlled by aem or dispatcher out of the box. Nor dispatcher  pay attention to those headers or modify internally. Check with webserver or cdn configuration.