mirror of
https://github.com/php/doc-zh.git
synced 2026-04-23 16:18:14 +02:00
308 lines
8.8 KiB
XML
308 lines
8.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: f4098e2bac4bcc136b95b85badcf4476fa683477 Maintainer: HonestQiao Status: ready -->
|
|
<!-- CREDITS: mowangjuanzi -->
|
|
<section xmlns="http://docbook.org/ns/docbook" xml:id="memcache.ini">
|
|
&reftitle.runtime;
|
|
&extension.runtime;
|
|
<para>
|
|
<table>
|
|
<title>Memcache 配置选项</title>
|
|
<tgroup cols="4">
|
|
<thead>
|
|
<row>
|
|
<entry>&Name;</entry>
|
|
<entry>&Default;</entry>
|
|
<entry>&Changeable;</entry>
|
|
<entry>&Changelog;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody xml:id="memcache.ini.list">
|
|
<row>
|
|
<entry><link linkend="ini.memcache.allow-failover">memcache.allow_failover</link></entry>
|
|
<entry>"1"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Available since memcache 2.0.2.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.memcache.max-failover-attempts">memcache.max_failover_attempts</link></entry>
|
|
<entry>"20"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Available since memcache 2.1.0.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.memcache.chunk-size">memcache.chunk_size</link></entry>
|
|
<entry>"8192"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Available since memcache 2.0.2.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.memcache.default-port">memcache.default_port</link></entry>
|
|
<entry>"11211"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Available since memcache 2.0.2.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.memcache.hash-strategy">memcache.hash_strategy</link></entry>
|
|
<entry>"standard"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Available since memcache 2.2.0.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.memcache.hash-function">memcache.hash_function</link></entry>
|
|
<entry>"crc32"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Available since memcache 2.2.0.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.memcache.protocol">memcache.protocol</link></entry>
|
|
<entry>ascii</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Supported since memcache 3.0.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.memcache.redundancy">memcache.redundancy</link></entry>
|
|
<entry>1</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Supported since memcache 3.0.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.memcache.session-redundancy">memcache.session_redundancy</link></entry>
|
|
<entry>2</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Supported since memcache 3.0.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.memcache.compress-threshold">memcache.compress_threshold</link></entry>
|
|
<entry>20000</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Supported since memcache 3.0.3</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.memcache.lock-timeout">memcache.lock_timeout</link></entry>
|
|
<entry>15</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Supported since memcache 3.0.4</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
<table>
|
|
<title>影响 Memcache 行为的 Session 配置选项</title>
|
|
<tgroup cols="4">
|
|
<thead>
|
|
<row>
|
|
<entry>&Name;</entry>
|
|
<entry>&Default;</entry>
|
|
<entry>&Changeable;</entry>
|
|
<entry>&Changelog;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody xml:id="memcache.ini.list.extra">
|
|
<row>
|
|
<entry><link linkend="ini.memcache.save-handler">session.save_handler</link></entry>
|
|
<entry>"files"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Supported since memcache 2.1.2</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.memcache.save-path">session.save_path</link></entry>
|
|
<entry>""</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Supported since memcache 2.1.2</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
&ini.php.constants;
|
|
</para>
|
|
|
|
&ini.descriptions.title;
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry xml:id="ini.memcache.allow-failover">
|
|
<term>
|
|
<parameter>memcache.allow_failover</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
是否在发生错误时(对用户)透明的转移到其他服务器。
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.memcache.max-failover-attempts">
|
|
<term>
|
|
<parameter>memcache.max_failover_attempts</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
定义在写入和获取数据时最多尝试的服务器次数(即:故障转移最大尝试数),仅和
|
|
memcache.allow_failover 结合使用。
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.memcache.chunk-size">
|
|
<term>
|
|
<parameter>memcache.chunk_size</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
数据传输块大小,这个值越小网络I/O次数越多,如果发现莫名的速度降低, 可以尝试将此值调至 32768。
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.memcache.default-port">
|
|
<term>
|
|
<parameter>memcache.default_port</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
在连接 memcached 服务器时如果没有指定其它端口则使用默认 TCP 端口号。
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.memcache.hash-strategy">
|
|
<term>
|
|
<parameter>memcache.hash_strategy</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
控制将 key 映射到服务器时使用的(分布式)策略。设置此值为 <literal>consistent</literal> 以启用一致散列,允许服务器增减而不会导致重新映射
|
|
key。(译注:参见 http://tech.idv2.com/2008/07/24/memcached-004/)将此值设置为 <literal>standard</literal> 会导致使用旧策略。
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.memcache.hash-function">
|
|
<term>
|
|
<parameter>memcache.hash_function</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
控制将 key 映射到服务器时应用哪个 hash 函数,<literal>crc32</literal> 使用标准 CRC32 散列,<literal>fnv</literal> 使用 FNV-1a。
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.memcache.protocol">
|
|
<term>
|
|
<parameter>memcache.protocol</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.memcache.redundancy">
|
|
<term>
|
|
<parameter>memcache.redundancy</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.memcache.session-redundancy">
|
|
<term>
|
|
<parameter>memcache.session_redundancy</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.memcache.compress-threshold">
|
|
<term>
|
|
<parameter>memcache.compress_threshold</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.memcache.lock-timeout">
|
|
<term>
|
|
<parameter>memcache.lock_timeout</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.memcache.save-handler">
|
|
<term>
|
|
<parameter>session.save_handler</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
通过设置此值为 <literal>memcache</literal>,将 memcache 用作 session 处理程序。
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry xml:id="ini.memcache.save-path">
|
|
<term>
|
|
<parameter>session.save_path</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
定义服务器 URL,以逗号分隔,以用于 session 存储,例如<literal>"tcp://host1:11211, tcp://host2:11211"</literal>。
|
|
</simpara>
|
|
<simpara>
|
|
每个 url 可能包含应用于该服务器的参数,它们与 <function>Memcache::addServer</function> 方法相同。 例如
|
|
<literal>"tcp://host1:11211?persistent=1&weight=1&timeout=1&retry_interval=15"</literal>
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
</section>
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|