perusio / drupal-with-nginx

Running Drupal using nginx: an idiosyncratically crafted bleeding edge configuration.
854 stars 246 forks source link

Microcache not getting hits, always `X-Micro-Cache: EXPIRED` #237

Open geckolinux opened 8 years ago

geckolinux commented 8 years ago

Hi there,

It appears that my Nginx microcache never gets hit. I've been monitoring the headers as an anonymous user from a Firefox private browsing session, and I re-visit the same page several times in succession, but I always see X-Micro-Cache: EXPIRED. I can confirm that entries are being created in /var/cache/nginx/microcache. Any ideas what's going wrong?

http://example.com/forum/misc/somepage

GET /forum/misc/somepage HTTP/1.1
Host: example.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://example.com/forum/misc/somepage
Cookie: has_js=1; cookie-agreed=2
Connection: keep-alive
If-Modified-Since: Wed, 24 Feb 2016 05:01:34 GMT
If-None-Match: W/"1456290094-0"

HTTP/1.1 200 OK
Server: nginx
Date: Wed, 24 Feb 2016 05:01:54 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Keep-Alive: timeout=10
Vary: Accept-Encoding, Cookie
X-Powered-By: PHP/5.5.14
x-content-type-options: nosniff
Etag: W/"1456290114-0"
Content-Language: en
Link: </node/48>; rel="shortlink",</forum/misc/somepage>; rel="canonical"
Cache-Control: no-cache
Last-Modified: Wed, 24 Feb 2016 05:01:54 GMT
Expires: Thu, 01 Jan 1970 00:00:01 GMT
X-XSS-Protection: 1; mode=block
X-Frame-Options: DENY
X-Content-Options: nosniff
X-Micro-Cache: EXPIRED
Content-Encoding: gzip