annotate xml/cn/docs/http/ngx_http_map_module.xml @ 2980:c80a7cb452e8

Linux packages: actualized supported Alpine Linux versions.
author Konstantin Pavlov <thresh@nginx.com>
date Fri, 16 Jun 2023 18:53:11 -0700
parents ceb8a4e374b7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
792
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1 <?xml version="1.0"?>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3 <!--
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
4 Copyright (C) Igor Sysoev
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
5 Copyright (C) Nginx, Inc.
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
6 -->
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
7
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
9
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
10 <module name="Module ngx_http_map_module"
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
11 link="/cn/docs/http/ngx_http_map_module.html"
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
12 lang="cn"
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
13 translator="yzprofile"
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
14 rev="1">
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
15
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
16 <section id="summary">
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
17
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
18 <para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
19 模块 <literal>ngx_http_map_module</literal> 可以创建一些和另外变量相关联的变量。
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
20 </para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
21
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
22 </section>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
23
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
24
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
25 <section id="example" name="配置范例">
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
26
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
27 <para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
28 <example>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
29 map $http_host $name {
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
30 hostnames;
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
31
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
32 default 0;
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
33
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
34 example.com 1;
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
35 *.example.com 1;
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
36 example.org 2;
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
37 *.example.org 2;
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
38 .example.net 3;
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
39 wap.* 4;
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
40 }
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
41
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
42 map $http_user_agent $mobile {
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
43 default 0;
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
44 "~Opera Mini" 1;
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
45 }
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
46 </example>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
47 </para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
48
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
49 </section>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
50
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
51
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
52 <section id="directives" name="指令">
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
53
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
54 <directive name="map">
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
55 <syntax block="yes">
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
56 <value>string</value>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
57 <value>$variable</value></syntax>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
58 <default/>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
59 <context>http</context>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
60
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
61 <para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
62 在配置的参数中,第一个是要创建新的变量,它的值取决于后面一个或多个源变量。
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
63 <note>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
64 在0.9.0版本之前,这里只支持一个变量。
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
65 </note>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
66 </para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
67
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
68 <para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
69 在 <literal>map</literal> 块里的参数指定了源变量值和结果值的对应关系。
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
70 </para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
71
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
72 <para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
73 源变量值可以使用字符串或者正则表达式 (0.9.6)。
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
74 </para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
75
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
76 <para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
77 一个正则表达式如果以 “<literal>~</literal>” 开头,这个正则表达式对大小写敏感;
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
78 若以 “<literal>~*</literal>”开头 (1.0.4),这个正则表达式对大小写不敏感。
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
79 且正则表达式里可以包含命名捕获和位置捕获,这些变量可以跟结果变量一起被其它指令使用。
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
80 </para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
81
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
82 <para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
83 如果源变量的值正好跟特殊参数同名(看下面),它要以 “<literal>\</literal>” 字符作为前缀。
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
84 </para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
85
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
86 <para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
87 结果变量可以是一个字符串也可以是另外一个变量 (0.9.0)。
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
88 </para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
89
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
90 <para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
91 这个指令也支持三个特殊参数。
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
92 <list type="tag">
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
93 <tag-name><literal>default</literal> <value>value</value></tag-name>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
94 <tag-desc>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
95 如果源变量值没有匹配到任何变量,则设置一个默认值作为结果。
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
96 当没有设置 <literal>default</literal>,将会用一个空的字符串作为默认的结果。
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
97 </tag-desc>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
98
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
99 <tag-name><literal>hostnames</literal></tag-name>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
100 <tag-desc>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
101 允许用前缀或者后缀掩码指定域名作为源变量值,举个例子,
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
102 <example>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
103 *.example.com 1;
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
104 example.* 1;
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
105 </example>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
106 这两条记录
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
107 <example>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
108 example.com 1;
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
109 *.example.com 1;
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
110 </example>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
111 可以被合并为:
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
112 <example>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
113 .example.com 1;
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
114 </example>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
115 这个参数必须写在值映射列表的最前面。
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
116 </tag-desc>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
117
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
118 <tag-name><literal>include</literal> <value>file</value></tag-name>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
119 <tag-desc>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
120 包含一个或者多个存有映射值的文件。
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
121 </tag-desc>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
122
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
123 </list>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
124 </para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
125
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
126 <para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
127 如果源值匹配了多余一个的指定变量,例如掩码和正则同时匹配,那么将会按照下面的顺序进行优先选择:
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
128 <list type="enum">
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
129
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
130 <listitem>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
131 没有掩码的字符串
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
132 </listitem>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
133
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
134 <listitem>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
135 最长的带前缀的字符串,例如: “<literal>*.example.com</literal>”
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
136 </listitem>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
137
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
138 <listitem>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
139 最长的带后缀的字符串,例如:“<literal>mail.*</literal>”
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
140 </listitem>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
141
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
142 <listitem>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
143 按顺序第一个先匹配的正则表达式 (在配置文件中体现的顺序)
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
144 </listitem>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
145
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
146 <listitem>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
147 默认值
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
148 </listitem>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
149
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
150 </list>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
151 </para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
152
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
153 </directive>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
154
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
155
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
156 <directive name="map_hash_bucket_size">
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
157 <syntax><value>size</value></syntax>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
158 <default>32|64|128</default>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
159 <context>http</context>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
160
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
161 <para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
162 为 <link id="map"/> 的变量哈稀表设置桶大小。
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
163 默认值取决于处理器cache line的大小。
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
164 可以从这里获取到更多参考信息:
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
165 <link doc="../hash.xml">设置哈稀表</link>.
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
166 </para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
167
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
168 </directive>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
169
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
170
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
171 <directive name="map_hash_max_size">
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
172 <syntax><value>size</value></syntax>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
173 <default>2048</default>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
174 <context>http</context>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
175
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
176 <para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
177 设置 <link id="map"/> 变量哈稀表<value>大小</value>的上限。
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
178 可以从这里获取到更多参考信息:
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
179 <link doc="../hash.xml">设置哈稀表</link>.
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
180 </para>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
181
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
182 </directive>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
183
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
184 </section>
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
185
ceb8a4e374b7 Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
186 </module>