proxy_cache_use_stale

Syntax: proxy_cache_use_stale error | timeout | invalid_header | updating | http_500 | http_502 | http_503 | http_504 | http_403 | http_404 | off ...;
Default: proxy_cache_use_stale off;
Context: http, server, location

Determines in which cases a stale cached response can be used when an error occurs during communication with the proxied server. The directive’s parameters match the parameters of the proxy_next_upstream directive.

The error parameter also permits using a stale cached response if a proxied server to process a request cannot be selected.

Additionally, the updating parameter permits using a stale cached response if it is currently being updated. This allows minimizing the number of accesses to proxied servers when updating cached data.

To minimize the number of accesses to proxied servers when populating a new cache element, the proxy_cache_lock directive can be used.

doc_nginx
2017-02-09 07:08:12
Comments
Leave a Comment

Please login to continue.