Mercurial > hg > nginx-site
comparison xml/en/docs/stream/ngx_stream_keyval_module.xml @ 2542:bde7cd9a1173
Added examples of state path to keyval.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 19 May 2020 12:54:47 +0100 |
parents | 4823370295e6 |
children | 462ca0f20a3d |
comparison
equal
deleted
inserted
replaced
2541:0e6bbd8138c4 | 2542:bde7cd9a1173 |
---|---|
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
8 | 8 |
9 <module name="Module ngx_stream_keyval_module" | 9 <module name="Module ngx_stream_keyval_module" |
10 link="/en/docs/stream/ngx_stream_keyval_module.html" | 10 link="/en/docs/stream/ngx_stream_keyval_module.html" |
11 lang="en" | 11 lang="en" |
12 rev="8"> | 12 rev="9"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 The <literal>ngx_stream_keyval_module</literal> module (1.13.7) creates variables | 17 The <literal>ngx_stream_keyval_module</literal> module (1.13.7) creates variables |
43 } | 43 } |
44 } | 44 } |
45 | 45 |
46 stream { | 46 stream { |
47 | 47 |
48 keyval_zone zone=one:32k state=one.keyval; | 48 keyval_zone zone=one:32k state=/var/lib/nginx/state/one.keyval; |
49 keyval $ssl_server_name $name zone=one; | 49 keyval $ssl_server_name $name zone=one; |
50 | 50 |
51 server { | 51 server { |
52 listen 12345 ssl; | 52 listen 12345 ssl; |
53 proxy_pass $name; | 53 proxy_pass $name; |
103 | 103 |
104 <para id="keyval_state"> | 104 <para id="keyval_state"> |
105 The optional <literal>state</literal> parameter specifies a <value>file</value> | 105 The optional <literal>state</literal> parameter specifies a <value>file</value> |
106 that keeps the current state of the key-value database in the JSON format | 106 that keeps the current state of the key-value database in the JSON format |
107 and makes it persistent across nginx restarts. | 107 and makes it persistent across nginx restarts. |
108 </para> | |
109 | |
110 <para> | |
111 Examples: | |
112 <example> | |
113 keyval_zone zone=one:32k state=/var/lib/nginx/state/one.keyval; # path for Linux | |
114 keyval_zone zone=one:32k state=/var/db/nginx/state/one.keyval; # path for FreeBSD | |
115 </example> | |
108 </para> | 116 </para> |
109 | 117 |
110 <para id="keyval_timeout"> | 118 <para id="keyval_timeout"> |
111 The optional <literal>timeout</literal> parameter (1.15.0) sets | 119 The optional <literal>timeout</literal> parameter (1.15.0) sets |
112 the time after which key-value pairs are removed from the zone. | 120 the time after which key-value pairs are removed from the zone. |