August 2017
Intermediate to advanced
278 pages
8h 53m
English
With the proxy_cache_use_stale directive, we specify which cases should use a stale copy of the cache. For this recipe, we've specified that when we have an error, timeout, 500 (Internal Server Error), 502 (Bad Gateway), 503 (Service Unavailable), and 504 (Gateway Timeout) errors from the backend server that the stale copy can be used.
If any of these scenarios trigger, we take the less abrupt option of serving the content. Especially, if you've got short cache times (such as microcaching), the users of the site won't even notice the difference.
Read now
Unlock full access