comparison xml/en/docs/http/ngx_http_keyval_module.xml @ 2028:5c55b7054b58

Updated docs for the upcoming NGINX Plus release.
author Ruslan Ermilov <ru@nginx.com>
date Sat, 26 Aug 2017 00:56:05 +0300
parents
children 5382bfa8a770
comparison
equal deleted inserted replaced
2027:dabca59da4ce 2028:5c55b7054b58
1 <?xml version="1.0"?>
2
3 <!--
4 Copyright (C) Nginx, Inc.
5 -->
6
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
8
9 <module name="Module ngx_http_keyval_module"
10 link="/en/docs/http/ngx_http_keyval_module.html"
11 lang="en"
12 rev="1">
13
14 <section id="summary">
15
16 <para>
17 The <literal>ngx_http_keyval_module</literal> module (1.13.3) creates variables
18 with values taken from key-value pairs managed by the
19 <link doc="ngx_http_api_module.xml" id="http_keyvals">API</link>.
20 </para>
21
22 <para>
23 <note>
24 This module is available as part of our
25 <commercial_version>commercial subscription</commercial_version>.
26 </note>
27 </para>
28
29 </section>
30
31
32 <section id="example" name="Example Configuration">
33
34 <para>
35 <example>
36 http {
37
38 keyval_zone zone=one:32k state=one.keyval;
39 keyval $arg_text $text zone=one;
40 ...
41 server {
42 ...
43 location / {
44 return 200 $text;
45 }
46
47 location /api {
48 api write=on;
49 }
50 }
51 }
52 </example>
53 </para>
54
55 </section>
56
57
58 <section id="directives" name="Directives">
59
60 <directive name="keyval">
61 <syntax>
62 <value>key</value>
63 <value>$variable</value>
64 <literal>zone</literal>=<value>name</value></syntax>
65 <default/>
66 <context>http</context>
67
68 <para>
69 Creates a new <value>$variable</value> whose value
70 is looked up by the <value>key</value> in the key-value database.
71 Strings are matched ignoring the case.
72 The database is stored in a shared memory zone
73 specified by the <literal>zone</literal> parameter.
74 </para>
75
76 </directive>
77
78
79 <directive name="keyval_zone">
80 <syntax>
81 <literal>zone</literal>=<value>name</value>:<value>size</value>
82 [<literal>state</literal>=<value>file</value>]</syntax>
83 <default/>
84 <context>http</context>
85
86 <para>
87 Sets the <value>name</value> and <value>size</value> of the shared memory zone
88 that keeps the key-value database.
89 Key-value pairs are managed by the
90 <link doc="ngx_http_api_module.xml" id="http_keyvals">API</link>.
91 </para>
92
93 <para>
94 The optional <literal>state</literal> parameter specifies a <value>file</value>
95 that keeps the current state of the key-value database in the JSON format
96 and makes it persistent across nginx restarts.
97 </para>
98
99 </directive>
100
101 </section>
102
103 </module>