Proxy_no_cache question

Maxim Dounin mdounin at mdounin.ru
Thu Jun 3 13:23:30 UTC 2021


Hello!

On Thu, Jun 03, 2021 at 10:12:50AM +0200, Eloy Coto Pereiro wrote:

> I was checking how proxy_no_cache is handled, and I want to open a
> discussion
> here. When it is set to off, should the ngx_http_upstream_cache[0] call at
> all? I
> mean, why start the cache options when it's not enabled at all?

The "proxy_no_cache on;" doesn't mean that the cache is not 
enabled at all.  Rather, it means that a particular response 
should not be saved to cache for some reason.  Whether or not it 
will be possible to save the response might not be known till the 
response headers are received.

If you want to completely disable caching, consider using 
"proxy_cache off;".

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx-devel mailing list