comparison xml/en/docs/http/ngx_http_proxy_module.xml @ 1028:e582a10b1917

Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
author Vladimir Homutov <vl@nginx.com>
date Mon, 02 Dec 2013 15:24:51 +0400
parents af77dd40abeb
children 379cb572a7ec
comparison
equal deleted inserted replaced
1027:dd64ce140de2 1028:e582a10b1917
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="16"> 13 rev="17">
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
359 are loaded (by default, 100). 359 are loaded (by default, 100).
360 Besides, the duration of one iteration is limited by the 360 Besides, the duration of one iteration is limited by the
361 <literal>loader_threshold</literal> parameter (by default, 200 milliseconds). 361 <literal>loader_threshold</literal> parameter (by default, 200 milliseconds).
362 Between iterations, a pause configured by the <literal>loader_sleep</literal> 362 Between iterations, a pause configured by the <literal>loader_sleep</literal>
363 parameter (by default, 50 milliseconds) is made. 363 parameter (by default, 50 milliseconds) is made.
364 </para>
365
366 </directive>
367
368
369 <directive name="proxy_cache_purge">
370 <syntax>string ...</syntax>
371 <default/>
372 <context>http</context>
373 <context>server</context>
374 <context>location</context>
375 <appeared-in>1.5.7</appeared-in>
376
377 <para>
378 Defines conditions under which the request will be considered a cache
379 purge request.
380 If at least one value of the string parameters is not empty and is not equal
381 to “0” then the cache entry with a corresponding
382 <link id="proxy_cache_key">cache key</link> is removed.
383 The result of successful operation is indicated by returning
384 the <http-status code="204" text="No Content"/> response.
385 </para>
386
387 <para>
388 If the <link id="proxy_cache_key">cache key</link> of a purge request ends
389 with an asterisk (“<literal>*</literal>”), all cache entries matching the
390 wildcard key will be removed from the cache.
391 </para>
392
393 <para>
394 Example configuration:
395 <example>
396 proxy_cache_path /data/nginx/cache keys_zone=cache_zone:10m;
397
398 map $request_method $purge_method {
399 PURGE 1;
400 default 0;
401 }
402
403 server {
404 ...
405 location / {
406 proxy_pass http://backend;
407 proxy_cache cache_zone;
408 proxy_cache_key $uri;
409 proxy_cache_purge $purge_method;
410 }
411 }
412 </example>
413 <note>
414 This functionality is available as part of our <commercial_version/> only.
415 </note>
364 </para> 416 </para>
365 417
366 </directive> 418 </directive>
367 419
368 420