comparison xml/en/docs/http/ngx_http_proxy_module.xml @ 1910:41cf2c2d8c5c

Cache: support for stale-while-revalidate and stale-if-error.
author Yaroslav Zhuravlev <yar@nginx.com>
date Wed, 15 Feb 2017 23:17:00 +0300
parents 399d0e188195
children ec4af97e4403
comparison
equal deleted inserted replaced
1909:399d0e188195 1910:41cf2c2d8c5c
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> 8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
9 9
10 <module name="Module ngx_http_proxy_module" 10 <module name="Module ngx_http_proxy_module"
11 link="/en/docs/http/ngx_http_proxy_module.html" 11 link="/en/docs/http/ngx_http_proxy_module.html"
12 lang="en" 12 lang="en"
13 rev="55"> 13 rev="56">
14 14
15 <section id="summary"> 15 <section id="summary">
16 16
17 <para> 17 <para>
18 The <literal>ngx_http_proxy_module</literal> module allows passing 18 The <literal>ngx_http_proxy_module</literal> module allows passing
638 <context>server</context> 638 <context>server</context>
639 <context>location</context> 639 <context>location</context>
640 640
641 <para> 641 <para>
642 Determines in which cases a stale cached response can be used 642 Determines in which cases a stale cached response can be used
643 when an error occurs during communication with the proxied server. 643 during communication with the proxied server.
644 The directive’s parameters match the parameters of the 644 The directive’s parameters match the parameters of the
645 <link id="proxy_next_upstream"/> directive. 645 <link id="proxy_next_upstream"/> directive.
646 </para> 646 </para>
647 647
648 <para> 648 <para>
649 The <literal>error</literal> parameter also permits 649 The <literal>error</literal> parameter also permits
650 using a stale cached response if a proxied server to process a request 650 using a stale cached response if a proxied server to process a request
651 cannot be selected. 651 cannot be selected.
652 The same behavior can be enabled with the
653 “<link url="https://tools.ietf.org/html/rfc5861#section-4">stale-if-error</link>”
654 extension of the <header>Cache-Control</header> response header field (1.11.10)
655 for a specified number of seconds after the response became stale,
656 however, this has lower priority than using the directive parameter.
652 </para> 657 </para>
653 658
654 <para id="proxy_cache_use_stale_updating"> 659 <para id="proxy_cache_use_stale_updating">
655 Additionally, the <literal>updating</literal> parameter permits 660 Additionally, the <literal>updating</literal> parameter permits
656 using a stale cached response if it is currently being updated. 661 using a stale cached response if it is currently being updated.
657 This allows minimizing the number of accesses to proxied servers 662 This allows minimizing the number of accesses to proxied servers
658 when updating cached data. 663 when updating cached data.
664 The same behavior can be enabled with the
665 “<link url="https://tools.ietf.org/html/rfc5861#section-3">stale-while-revalidate</link>”
666 extension of the <header>Cache-Control</header> response header field (1.11.10)
667 for a specified number of seconds after the response became stale,
668 however, this has lower priority than using the directive parameter.
659 </para> 669 </para>
660 670
661 <para> 671 <para>
662 To minimize the number of accesses to proxied servers when 672 To minimize the number of accesses to proxied servers when
663 populating a new cache element, the <link id="proxy_cache_lock"/> 673 populating a new cache element, the <link id="proxy_cache_lock"/>