A 503 page gets written to my proxy cache, overwriting the 200

Maxim Dounin mdounin at mdounin.ru
Thu Jan 16 22:08:16 UTC 2014


Hello!

On Thu, Jan 16, 2014 at 02:50:41PM -0500, rge3 wrote:

> Maxim Dounin Wrote:
> -------------------------------------------------------
>  
> > An exiting cache can be bypassed due to proxy_cache_bypass in your 
> > config, and 503 response can be cached if it contains 
> > Cache-Control and/or Expires which allow caching.
> 
> Oh, I hadn't thought of that part about the bypass.  Okay, that makes
> sense.
> But what about the Cache-Control/Expires causing it to cache the 503... 
> that can
> still happen even if my "proxy_cache_valid" line doesn't list a 503?

The "proxy_cache_valid" directives are used if there are no 
Cache-Control/Expires to allow caching (or they are ignored with 
proxy_ignore_headers).  That is, with "proxy_cache_valid" you can 
cache something which isn't normally cached, but they don't 
prevent caching of other responses.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx mailing list