proxy_cache incorrectly returning 304 Not Modified

Jon Leighton j at
Wed Jan 8 14:57:18 UTC 2014

Hi there,

I work on a site which has nginx in front of a Rails application, and we
use proxy_cache.

For the home page, our application returns a "max-age=600, public"
Cache-Control header, and we have nginx configured to cache the response
using proxy_cache.

This generally works fine, but last night nginx started to respond with
304 Not Modified to requests that *didn't* include any caching headers
(If-Modified-Since or ETag). Our Pingdom alerts showed this issue, and
here is the request/response captured:

GET / HTTP/1.0
User-Agent: Pingdom.com_bot_version_1.4_(

304 Not Modified
Cache-Control: max-age=600, public
Date: Tue, 07 Jan 2014 22:59:32 GMT
ETag: "900e1f11422519337c9ed25fad299ce0"
Server: nginx/1.4.4
Status: 304 Not Modified
Strict-Transport-Security: max-age=31536000
X-Cache-Status: HIT
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Request-Id: c7ee78ab-df49-4467-bced-753b2cc622ab
X-UA-Compatible: chrome=1
X-XSS-Protection: 1; mode=block
Connection: Close

Does this look like a bug? Or could it be a configuration issue? I can't
think of any reason why this should be the correct thing for the proxy
cache to do.

Many thanks,



More information about the nginx mailing list