File tree Expand file tree Collapse file tree 25 files changed +290
-296
lines changed
Expand file tree Collapse file tree 25 files changed +290
-296
lines changed Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 2e8ef0a1bd98243cb2c6c5c627a195bb53a7a440 Maintainer: mowangjuanzi Status: ready -->
4- <book xml : id = " book.memcache " xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
3+ <!-- EN-Revision: f4098e2bac4bcc136b95b85badcf4476fa683477 Maintainer: mowangjuanzi Status: ready -->
4+ <book xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xml : id = " book.memcache " >
55 <?phpdoc extension-membership =" pecl" ?>
66 <title >Memcache</title >
7-
7+
88 <!-- {{{ preface -->
99 <preface xml : id =" intro.memcache" >
1010 &reftitle.intro;
11- <para >
11+ <simpara >
1212 Memcache 模块为 memcached 提供了方便的面向过程及面向对象的接口,memcached 是为了降低动态 web 应用程序数据库负载的一种高效的缓存守护程序。
13- </para >
14- <para >
13+ </simpara >
14+ <simpara >
1515 Memcache 模块同时提供了 <link linkend =" ref.session" >session</link > 处理程序(<literal >memcache</literal >)。
16- </para >
17- <para >
16+ </simpara >
17+ <simpara >
1818 更多关于 memcached 的信息请参见 <link xlink : href =" &url.memcache; " >&url.memcache; </link >。
19- </para >
19+ </simpara >
2020 </preface >
2121 <!-- }}} -->
22-
22+
2323 &reference.memcache.setup;
2424 &reference.memcache.constants;
2525 &reference.memcache.examples;
2626 &reference.memcache.memcache;
2727 &reference.memcache.reference;
2828
2929</book >
30-
3130<!-- Keep this comment at the end of the file
3231Local variables:
3332mode: sgml
@@ -48,4 +47,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
4847vim: et tw=78 syn=sgml
4948vi: ts=1 sw=1
5049-->
51-
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: af4410a7e15898c3dbe83d6ea38246745ed9c6fb Maintainer: mowangjuanzi Status: ready -->
4- <section xml : id = " memcache.installation " xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
3+ <!-- EN-Revision: f4098e2bac4bcc136b95b85badcf4476fa683477 Maintainer: mowangjuanzi Status: ready -->
4+ <section xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xml : id = " memcache.installation " >
55 &reftitle.install;
6- <para >
6+ <simpara >
77 &pecl.moved;
88 &pecl.info;
99 <link xlink : href =" &url.pecl.package; memcache" >&url.pecl.package; memcache</link >.
10- </para >
10+ </simpara >
1111 <note >
12- <para >
12+ <simpara >
1313 可以禁用 memcache session 处理程序的支持。“pecl install”选项对此进行提示(默认启用),但是当静态编译为
1414 PHP 时,可以使用 <option role =" configure" >--disable-memcache-session</option > 配置选项。
15- </para >
15+ </simpara >
1616 </note >
1717
1818</section >
19-
2019<!-- Keep this comment at the end of the file
2120Local variables:
2221mode: sgml
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: f77acbec03e0937e560e9f901a26bb5f6f6992fb Maintainer: mowangjuanzi Status: ready -->
3+ <!-- EN-Revision: f4098e2bac4bcc136b95b85badcf4476fa683477 Maintainer: mowangjuanzi Status: ready -->
44<chapter xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xml : id =" memcache.examples" >
55 &reftitle.examples;
66 <section xml : id =" memcache.examples-overview" >
77 <title >基础用法</title >
88 <example >
99 <title >memcache 扩展概述示例</title >
10- <para >
10+ <simpara >
1111 在这个例子中,一个对象被保存到缓存中,又被取回。存储之前会序列化对象和其他非标量类型,因此不能在缓存中存储资源(即连接标识符和其它)。
12- </para >
12+ </simpara >
1313 <programlisting role =" php" >
1414<![CDATA[
1515<?php
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: f77acbec03e0937e560e9f901a26bb5f6f6992fb Maintainer: mowangjuanzi Status: ready -->
3+ <!-- EN-Revision: f4098e2bac4bcc136b95b85badcf4476fa683477 Maintainer: mowangjuanzi Status: ready -->
44<refentry xmlns =" http://docbook.org/ns/docbook" xml : id =" function.memcache-debug" >
55 <refnamediv >
66 <refname >memcache_debug</refname >
1818 如果参数 <parameter >on_off</parameter > 为 &true; ,<function >memcache_debug</function >
1919 打开调试输出,如果为 &false; ,则关闭调试输出。
2020 <note >
21- <para >
21+ <simpara >
2222 <function >memcache_debug</function > 仅在 PHP 以 --enable-debug 选项编译时可以访问,并且在这种情况下始终返回
2323 &true; ,其他情况下此函数无效并始终返回 &false; 。
24- </para >
24+ </simpara >
2525 </note >
2626 </para >
2727
3333 <varlistentry >
3434 <term ><parameter >on_off</parameter ></term >
3535 <listitem >
36- <para >
36+ <simpara >
3737 如果为 &true; ,则打开调试输出。如果为 &false; 则关闭调试输出。
38- </para >
38+ </simpara >
3939 </listitem >
4040 </varlistentry >
4141 </variablelist >
4242 </refsect1 >
4343
4444 <refsect1 role =" returnvalues" >
4545 &reftitle.returnvalues;
46- <para >
46+ <simpara >
4747 当 PHP 以 --enalbe-debug 选项编译时返回 &true; 其他情况下返回 &false; 。
48- </para >
48+ </simpara >
4949 </refsect1 >
5050
5151</refentry >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: f77acbec03e0937e560e9f901a26bb5f6f6992fb Maintainer: HonestQiao Status: ready -->
3+ <!-- EN-Revision: f4098e2bac4bcc136b95b85badcf4476fa683477 Maintainer: HonestQiao Status: ready -->
44<!-- CREDITS: mowangjuanzi -->
55<section xmlns =" http://docbook.org/ns/docbook" xml : id =" memcache.ini" >
66 &reftitle.runtime;
127127 <type >bool</type >
128128 </term >
129129 <listitem >
130- <para >
130+ <simpara >
131131 是否在发生错误时(对用户)透明的转移到其他服务器。
132- </para >
132+ </simpara >
133133 </listitem >
134134 </varlistentry >
135135
139139 <type >int</type >
140140 </term >
141141 <listitem >
142- <para >
142+ <simpara >
143143 定义在写入和获取数据时最多尝试的服务器次数(即:故障转移最大尝试数),仅和
144144 memcache.allow_failover 结合使用。
145- </para >
145+ </simpara >
146146 </listitem >
147147 </varlistentry >
148148
152152 <type >int</type >
153153 </term >
154154 <listitem >
155- <para >
155+ <simpara >
156156 数据传输块大小,这个值越小网络I/O次数越多,如果发现莫名的速度降低, 可以尝试将此值调至 32768。
157- </para >
157+ </simpara >
158158 </listitem >
159159 </varlistentry >
160160
164164 <type >string</type >
165165 </term >
166166 <listitem >
167- <para >
167+ <simpara >
168168 在连接 memcached 服务器时如果没有指定其它端口则使用默认 TCP 端口号。
169- </para >
169+ </simpara >
170170 </listitem >
171171 </varlistentry >
172172
176176 <type >string</type >
177177 </term >
178178 <listitem >
179- <para >
179+ <simpara >
180180 控制将 key 映射到服务器时使用的(分布式)策略。设置此值为 <literal >consistent</literal > 以启用一致散列,允许服务器增减而不会导致重新映射
181181 key。(译注:参见 http://tech.idv2.com/2008/07/24/memcached-004/)将此值设置为 <literal >standard</literal > 会导致使用旧策略。
182- </para >
182+ </simpara >
183183 </listitem >
184184 </varlistentry >
185185
189189 <type >string</type >
190190 </term >
191191 <listitem >
192- <para >
192+ <simpara >
193193 控制将 key 映射到服务器时应用哪个 hash 函数,<literal >crc32</literal > 使用标准 CRC32 散列,<literal >fnv</literal > 使用 FNV-1a。
194- </para >
194+ </simpara >
195195 </listitem >
196196 </varlistentry >
197197
201201 <type >string</type >
202202 </term >
203203 <listitem >
204- <para >
204+ <simpara >
205205
206- </para >
206+ </simpara >
207207 </listitem >
208208 </varlistentry >
209209
213213 <type >int</type >
214214 </term >
215215 <listitem >
216- <para >
216+ <simpara >
217217
218- </para >
218+ </simpara >
219219 </listitem >
220220 </varlistentry >
221221
225225 <type >int</type >
226226 </term >
227227 <listitem >
228- <para >
228+ <simpara >
229229
230- </para >
230+ </simpara >
231231 </listitem >
232232 </varlistentry >
233233
237237 <type >int</type >
238238 </term >
239239 <listitem >
240- <para >
240+ <simpara >
241241
242- </para >
242+ </simpara >
243243 </listitem >
244244 </varlistentry >
245245
249249 <type >int</type >
250250 </term >
251251 <listitem >
252- <para >
252+ <simpara >
253253
254- </para >
254+ </simpara >
255255 </listitem >
256256 </varlistentry >
257257
261261 <type >string</type >
262262 </term >
263263 <listitem >
264- <para >
264+ <simpara >
265265 通过设置此值为 <literal >memcache</literal >,将 memcache 用作 session 处理程序。
266- </para >
266+ </simpara >
267267 </listitem >
268268 </varlistentry >
269269
273273 <type >string</type >
274274 </term >
275275 <listitem >
276- <para >
276+ <simpara >
277277 定义服务器 URL,以逗号分隔,以用于 session 存储,例如<literal >"tcp://host1:11211, tcp://host2:11211"</literal >。
278- </para >
279- <para >
278+ </simpara >
279+ <simpara >
280280 每个 url 可能包含应用于该服务器的参数,它们与 <function >Memcache::addServer</function > 方法相同。 例如
281281 <literal >"tcp://host1:11211?persistent=1& weight=1& timeout=1& retry_interval=15"</literal >
282- </para >
282+ </simpara >
283283 </listitem >
284284 </varlistentry >
285285
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 8b6d169424ff189bb563ef4c3f35f8adff3f42c5 Maintainer: mowangjuanzi Status: ready -->
3+ <!-- EN-Revision: f4098e2bac4bcc136b95b85badcf4476fa683477 Maintainer: mowangjuanzi Status: ready -->
44<!-- CREDITS: Luffy -->
5- <reference xml : id = " class.memcache " role = " class " xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xmlns : xi =" http://www.w3.org/2001/XInclude" >
5+ <reference xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xmlns : xi =" http://www.w3.org/2001/XInclude" xml : id = " class.memcache " role = " class " >
66
77 <title >Memcache 类</title >
88 <titleabbrev >Memcache</titleabbrev >
1212<!-- {{{ Memcache intro -->
1313 <section xml : id =" memcache.intro" >
1414 &reftitle.intro;
15- <para >
15+ <simpara >
1616 表示与一组 memcache 服务器的连接。
17- </para >
17+ </simpara >
1818 </section >
1919<!-- }}} -->
2020
3232 </ooclass >
3333 </classsynopsisinfo >
3434<!-- }}} -->
35-
36- <xi : include xpointer =" xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.memcache')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
35+
36+ <xi : include xpointer =" xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.memcache')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
3737 </classsynopsis >
3838<!-- }}} -->
3939
4040 </section >
41-
41+
4242 </partintro >
4343
4444 &reference.memcache.entities.memcache;
4545
4646</reference >
47-
4847<!-- Keep this comment at the end of the file
4948Local variables:
5049mode: sgml
You can’t perform that action at this time.
0 commit comments