Expand my Community achievements bar.

SOLVED

Dispatcher returning cached site third time, not second time

Avatar

Former Community Member

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?

1 Accepted Solution

Avatar

Correct answer by
Level 10

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.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

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.