[nginx] Is proxy_cache_valid required?

Robert Paprocki rpaprocki at fearnothingproductions.net
Fri Jul 25 16:59:56 UTC 2014


Thanks, this was indeed the problem- I should have checked that first.
Thank you as always Maxim! :D

On 07/25/2014 09:49 AM, Maxim Dounin wrote:
> Hello!
> 
> On Fri, Jul 25, 2014 at 09:30:04AM -0700, Robert Paprocki wrote:
> 
>> Hello!
>>
>> I had trouble this morning setting up a basic cache with a proxy. Based
>> on the proxy documentation and
>> http://nginx.com/resources/admin-guide/caching/, I did not expect to
>> have to set proxy_cache_valid; however, when this directive was not set
>> anywhere, I saw no cache files written.
> 
> The proxy_cache_valid directives are needed if backend response 
> doesn't indicate cacheability of the response with "Cache-Control: 
> max-age=...", "Expires", or "X-Accel-Expires" (or if these headers 
> are ignored using the "proxy_ignore_headers" directive).
> 



More information about the nginx mailing list