comparison xml/en/docs/http/ngx_http_fastcgi_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 4add6ae1296f
children
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_fastcgi_module" 10 <module name="Module ngx_http_fastcgi_module"
11 link="/en/docs/http/ngx_http_fastcgi_module.html" 11 link="/en/docs/http/ngx_http_fastcgi_module.html"
12 lang="en" 12 lang="en"
13 rev="53"> 13 rev="54">
14 14
15 <section id="summary"> 15 <section id="summary">
16 16
17 <para> 17 <para>
18 The <literal>ngx_http_fastcgi_module</literal> module allows passing 18 The <literal>ngx_http_fastcgi_module</literal> module allows passing
390 [<literal>manager_files</literal>=<value>number</value>] 390 [<literal>manager_files</literal>=<value>number</value>]
391 [<literal>manager_sleep</literal>=<value>time</value>] 391 [<literal>manager_sleep</literal>=<value>time</value>]
392 [<literal>manager_threshold</literal>=<value>time</value>] 392 [<literal>manager_threshold</literal>=<value>time</value>]
393 [<literal>loader_files</literal>=<value>number</value>] 393 [<literal>loader_files</literal>=<value>number</value>]
394 [<literal>loader_sleep</literal>=<value>time</value>] 394 [<literal>loader_sleep</literal>=<value>time</value>]
395 [<literal>loader_threshold</literal>=<value>time</value>] 395 [<literal>loader_threshold</literal>=<value>time</value>]</syntax>
396 [<literal>purger</literal>=<literal>on</literal>|<literal>off</literal>]
397 [<literal>purger_files</literal>=<value>number</value>]
398 [<literal>purger_sleep</literal>=<value>time</value>]
399 [<literal>purger_threshold</literal>=<value>time</value>]</syntax>
400 <default/> 396 <default/>
401 <context>http</context> 397 <context>http</context>
402 398
403 <para> 399 <para>
404 Sets the path and other parameters of a cache. 400 Sets the path and other parameters of a cache.
440 <para> 436 <para>
441 In addition, all active keys and information about data are stored 437 In addition, all active keys and information about data are stored
442 in a shared memory zone, whose <value>name</value> and <value>size</value> 438 in a shared memory zone, whose <value>name</value> and <value>size</value>
443 are configured by the <literal>keys_zone</literal> parameter. 439 are configured by the <literal>keys_zone</literal> parameter.
444 One megabyte zone can store about 8 thousand keys. 440 One megabyte zone can store about 8 thousand keys.
445 <note>
446 As part of
447 <commercial_version>commercial subscription</commercial_version>,
448 the shared memory zone also stores extended
449 cache <link doc="ngx_http_api_module.xml" id="http_caches_">information</link>,
450 thus, it is required to specify a larger zone size for the same number of keys.
451 For example,
452 one megabyte zone can store about 4 thousand keys.
453 </note>
454 </para> 441 </para>
455 442
456 <para> 443 <para>
457 Cached data that are not accessed during the time specified by the 444 Cached data that are not accessed during the time specified by the
458 <literal>inactive</literal> parameter get removed from the cache 445 <literal>inactive</literal> parameter get removed from the cache
492 Between iterations, a pause configured by the <literal>loader_sleep</literal> 479 Between iterations, a pause configured by the <literal>loader_sleep</literal>
493 parameter (by default, 50 milliseconds) is made. 480 parameter (by default, 50 milliseconds) is made.
494 </para> 481 </para>
495 482
496 <para> 483 <para>
497 Additionally,
498 the following parameters are available as part of our
499 <commercial_version>commercial subscription</commercial_version>:
500 </para>
501
502 <para>
503 <list type="tag">
504
505 <tag-name id="purger">
506 <literal>purger</literal>=<literal>on</literal>|<literal>off</literal>
507 </tag-name>
508 <tag-desc>
509 Instructs whether cache entries that match a
510 <link id="fastcgi_cache_purge">wildcard key</link>
511 will be removed from the disk by the cache purger (1.7.12).
512 Setting the parameter to <literal>on</literal>
513 (default is <literal>off</literal>)
514 will activate the “cache purger” process that
515 permanently iterates through all cache entries
516 and deletes the entries that match the wildcard key.
517 </tag-desc>
518
519 <tag-name id="purger_files">
520 <literal>purger_files</literal>=<value>number</value>
521 </tag-name>
522 <tag-desc>
523 Sets the number of items that will be scanned during one iteration (1.7.12).
524 By default, <literal>purger_files</literal> is set to 10.
525 </tag-desc>
526
527 <tag-name id="purger_threshold">
528 <literal>purger_threshold</literal>=<value>number</value>
529 </tag-name>
530 <tag-desc>
531 Sets the duration of one iteration (1.7.12).
532 By default, <literal>purger_threshold</literal> is set to 50 milliseconds.
533 </tag-desc>
534
535 <tag-name id="purger_sleep">
536 <literal>purger_sleep</literal>=<value>number</value>
537 </tag-name>
538 <tag-desc>
539 Sets a pause between iterations (1.7.12).
540 By default, <literal>purger_sleep</literal> is set to 50 milliseconds.
541 </tag-desc>
542
543 </list>
544 </para>
545
546 <para>
547 <note> 484 <note>
548 In versions 1.7.3, 1.7.7, and 1.11.10 cache header format has been changed. 485 In versions 1.7.3, 1.7.7, and 1.11.10 cache header format has been changed.
549 Previously cached responses will be considered invalid 486 Previously cached responses will be considered invalid
550 after upgrading to a newer nginx version. 487 after upgrading to a newer nginx version.
551 </note>
552 </para>
553
554 </directive>
555
556
557 <directive name="fastcgi_cache_purge">
558 <syntax>string ...</syntax>
559 <default/>
560 <context>http</context>
561 <context>server</context>
562 <context>location</context>
563 <appeared-in>1.5.7</appeared-in>
564
565 <para>
566 Defines conditions under which the request will be considered a cache
567 purge request.
568 If at least one value of the string parameters is not empty and is not equal
569 to “0” then the cache entry with a corresponding
570 <link id="fastcgi_cache_key">cache key</link> is removed.
571 The result of successful operation is indicated by returning
572 the <http-status code="204" text="No Content"/> response.
573 </para>
574
575 <para>
576 If the <link id="fastcgi_cache_key">cache key</link> of a purge request ends
577 with an asterisk (“<literal>*</literal>”), all cache entries matching the
578 wildcard key will be removed from the cache.
579 However, these entries will remain on the disk until they are deleted
580 for either <link id="fastcgi_cache_path">inactivity</link>,
581 or processed by the <link id="purger">cache purger</link> (1.7.12),
582 or a client attempts to access them.
583 </para>
584
585 <para>
586 Example configuration:
587 <example>
588 fastcgi_cache_path /data/nginx/cache keys_zone=cache_zone:10m;
589
590 map $request_method $purge_method {
591 PURGE 1;
592 default 0;
593 }
594
595 server {
596 ...
597 location / {
598 fastcgi_pass backend;
599 fastcgi_cache cache_zone;
600 fastcgi_cache_key $uri;
601 fastcgi_cache_purge $purge_method;
602 }
603 }
604 </example>
605 <note>
606 This functionality is available as part of our
607 <commercial_version>commercial subscription</commercial_version>.
608 </note> 488 </note>
609 </para> 489 </para>
610 490
611 </directive> 491 </directive>
612 492