Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_uwsgi_module.xml @ 3043:9eadb98ec770
Free nginx: removed commercial version documentation.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 14 Feb 2024 20:05:49 +0300 |
parents | 37e082fd009c |
children | ca4c8ac67c0e |
comparison
equal
deleted
inserted
replaced
3042:19e4897acb84 | 3043:9eadb98ec770 |
---|---|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
9 | 9 |
10 <module name="Module ngx_http_uwsgi_module" | 10 <module name="Module ngx_http_uwsgi_module" |
11 link="/en/docs/http/ngx_http_uwsgi_module.html" | 11 link="/en/docs/http/ngx_http_uwsgi_module.html" |
12 lang="en" | 12 lang="en" |
13 rev="50"> | 13 rev="51"> |
14 | 14 |
15 <section id="summary"> | 15 <section id="summary"> |
16 | 16 |
17 <para> | 17 <para> |
18 The <literal>ngx_http_uwsgi_module</literal> module allows passing | 18 The <literal>ngx_http_uwsgi_module</literal> module allows passing |
381 [<literal>manager_files</literal>=<value>number</value>] | 381 [<literal>manager_files</literal>=<value>number</value>] |
382 [<literal>manager_sleep</literal>=<value>time</value>] | 382 [<literal>manager_sleep</literal>=<value>time</value>] |
383 [<literal>manager_threshold</literal>=<value>time</value>] | 383 [<literal>manager_threshold</literal>=<value>time</value>] |
384 [<literal>loader_files</literal>=<value>number</value>] | 384 [<literal>loader_files</literal>=<value>number</value>] |
385 [<literal>loader_sleep</literal>=<value>time</value>] | 385 [<literal>loader_sleep</literal>=<value>time</value>] |
386 [<literal>loader_threshold</literal>=<value>time</value>] | 386 [<literal>loader_threshold</literal>=<value>time</value>]</syntax> |
387 [<literal>purger</literal>=<literal>on</literal>|<literal>off</literal>] | |
388 [<literal>purger_files</literal>=<value>number</value>] | |
389 [<literal>purger_sleep</literal>=<value>time</value>] | |
390 [<literal>purger_threshold</literal>=<value>time</value>]</syntax> | |
391 <default/> | 387 <default/> |
392 <context>http</context> | 388 <context>http</context> |
393 | 389 |
394 <para> | 390 <para> |
395 Sets the path and other parameters of a cache. | 391 Sets the path and other parameters of a cache. |
431 <para> | 427 <para> |
432 In addition, all active keys and information about data are stored | 428 In addition, all active keys and information about data are stored |
433 in a shared memory zone, whose <value>name</value> and <value>size</value> | 429 in a shared memory zone, whose <value>name</value> and <value>size</value> |
434 are configured by the <literal>keys_zone</literal> parameter. | 430 are configured by the <literal>keys_zone</literal> parameter. |
435 One megabyte zone can store about 8 thousand keys. | 431 One megabyte zone can store about 8 thousand keys. |
436 <note> | |
437 As part of | |
438 <commercial_version>commercial subscription</commercial_version>, | |
439 the shared memory zone also stores extended | |
440 cache <link doc="ngx_http_api_module.xml" id="http_caches_">information</link>, | |
441 thus, it is required to specify a larger zone size for the same number of keys. | |
442 For example, | |
443 one megabyte zone can store about 4 thousand keys. | |
444 </note> | |
445 </para> | 432 </para> |
446 | 433 |
447 <para> | 434 <para> |
448 Cached data that are not accessed during the time specified by the | 435 Cached data that are not accessed during the time specified by the |
449 <literal>inactive</literal> parameter get removed from the cache | 436 <literal>inactive</literal> parameter get removed from the cache |
483 Between iterations, a pause configured by the <literal>loader_sleep</literal> | 470 Between iterations, a pause configured by the <literal>loader_sleep</literal> |
484 parameter (by default, 50 milliseconds) is made. | 471 parameter (by default, 50 milliseconds) is made. |
485 </para> | 472 </para> |
486 | 473 |
487 <para> | 474 <para> |
488 Additionally, | |
489 the following parameters are available as part of our | |
490 <commercial_version>commercial subscription</commercial_version>: | |
491 </para> | |
492 | |
493 <para> | |
494 <list type="tag"> | |
495 | |
496 <tag-name id="purger"> | |
497 <literal>purger</literal>=<literal>on</literal>|<literal>off</literal> | |
498 </tag-name> | |
499 <tag-desc> | |
500 Instructs whether cache entries that match a | |
501 <link id="uwsgi_cache_purge">wildcard key</link> | |
502 will be removed from the disk by the cache purger (1.7.12). | |
503 Setting the parameter to <literal>on</literal> | |
504 (default is <literal>off</literal>) | |
505 will activate the “cache purger” process that | |
506 permanently iterates through all cache entries | |
507 and deletes the entries that match the wildcard key. | |
508 </tag-desc> | |
509 | |
510 <tag-name id="purger_files"> | |
511 <literal>purger_files</literal>=<value>number</value> | |
512 </tag-name> | |
513 <tag-desc> | |
514 Sets the number of items that will be scanned during one iteration (1.7.12). | |
515 By default, <literal>purger_files</literal> is set to 10. | |
516 </tag-desc> | |
517 | |
518 <tag-name id="purger_threshold"> | |
519 <literal>purger_threshold</literal>=<value>number</value> | |
520 </tag-name> | |
521 <tag-desc> | |
522 Sets the duration of one iteration (1.7.12). | |
523 By default, <literal>purger_threshold</literal> is set to 50 milliseconds. | |
524 </tag-desc> | |
525 | |
526 <tag-name id="purger_sleep"> | |
527 <literal>purger_sleep</literal>=<value>number</value> | |
528 </tag-name> | |
529 <tag-desc> | |
530 Sets a pause between iterations (1.7.12). | |
531 By default, <literal>purger_sleep</literal> is set to 50 milliseconds. | |
532 </tag-desc> | |
533 | |
534 </list> | |
535 </para> | |
536 | |
537 <para> | |
538 <note> | 475 <note> |
539 In versions 1.7.3, 1.7.7, and 1.11.10 cache header format has been changed. | 476 In versions 1.7.3, 1.7.7, and 1.11.10 cache header format has been changed. |
540 Previously cached responses will be considered invalid | 477 Previously cached responses will be considered invalid |
541 after upgrading to a newer nginx version. | 478 after upgrading to a newer nginx version. |
542 </note> | |
543 </para> | |
544 | |
545 </directive> | |
546 | |
547 | |
548 <directive name="uwsgi_cache_purge"> | |
549 <syntax>string ...</syntax> | |
550 <default/> | |
551 <context>http</context> | |
552 <context>server</context> | |
553 <context>location</context> | |
554 <appeared-in>1.5.7</appeared-in> | |
555 | |
556 <para> | |
557 Defines conditions under which the request will be considered a cache | |
558 purge request. | |
559 If at least one value of the string parameters is not empty and is not equal | |
560 to “0” then the cache entry with a corresponding | |
561 <link id="uwsgi_cache_key">cache key</link> is removed. | |
562 The result of successful operation is indicated by returning | |
563 the <http-status code="204" text="No Content"/> response. | |
564 </para> | |
565 | |
566 <para> | |
567 If the <link id="uwsgi_cache_key">cache key</link> of a purge request ends | |
568 with an asterisk (“<literal>*</literal>”), all cache entries matching the | |
569 wildcard key will be removed from the cache. | |
570 However, these entries will remain on the disk until they are deleted | |
571 for either <link id="uwsgi_cache_path">inactivity</link>, | |
572 or processed by the <link id="purger">cache purger</link> (1.7.12), | |
573 or a client attempts to access them. | |
574 </para> | |
575 | |
576 <para> | |
577 Example configuration: | |
578 <example> | |
579 uwsgi_cache_path /data/nginx/cache keys_zone=cache_zone:10m; | |
580 | |
581 map $request_method $purge_method { | |
582 PURGE 1; | |
583 default 0; | |
584 } | |
585 | |
586 server { | |
587 ... | |
588 location / { | |
589 uwsgi_pass backend; | |
590 uwsgi_cache cache_zone; | |
591 uwsgi_cache_key $uri; | |
592 uwsgi_cache_purge $purge_method; | |
593 } | |
594 } | |
595 </example> | |
596 <note> | |
597 This functionality is available as part of our | |
598 <commercial_version>commercial subscription</commercial_version>. | |
599 </note> | 479 </note> |
600 </para> | 480 </para> |
601 | 481 |
602 </directive> | 482 </directive> |
603 | 483 |