mirror of
https://github.com/php/doc-en.git
synced 2026-03-23 23:32:18 +01:00
memcache: fix XML to remove useless wrapping para tags via script
This commit is contained in:
@@ -1,20 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<chapter xml:id="memcache.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="memcache.examples">
|
||||
&reftitle.examples;
|
||||
<section xml:id="memcache.examples-overview">
|
||||
<title>Basic usage</title>
|
||||
<para>
|
||||
<example>
|
||||
<title>memcache extension overview example</title>
|
||||
<para>
|
||||
In this example, an object is being saved in the cache and then
|
||||
retrieved back. Object and other non-scalar types are serialized
|
||||
before saving, so it's impossible to store resources (i.e. connection
|
||||
identifiers and others) in the cache.
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title>memcache extension overview example</title>
|
||||
<para>
|
||||
In this example, an object is being saved in the cache and then
|
||||
retrieved back. Object and other non-scalar types are serialized
|
||||
before saving, so it's impossible to store resources (i.e. connection
|
||||
identifiers and others) in the cache.
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -38,13 +36,11 @@ var_dump($get_result);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Using memcache session handler</title>
|
||||
<programlisting role="php">
|
||||
</programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title>Using memcache session handler</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -54,12 +50,10 @@ ini_set('session.save_path', $session_save_path);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</programlisting>
|
||||
</example>
|
||||
</section>
|
||||
</chapter>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
@@ -80,5 +74,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="function.memcache-debug" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.memcache-debug">
|
||||
<refnamediv>
|
||||
<refname>memcache_debug</refname>
|
||||
<refpurpose>Turn debug output on/off</refpurpose>
|
||||
@@ -30,19 +30,17 @@
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>on_off</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Turns debug output on if equals to &true;.
|
||||
Turns debug output off if equals to &false;.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>on_off</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Turns debug output on if equals to &true;.
|
||||
Turns debug output off if equals to &false;.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
@@ -54,7 +52,6 @@
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<section xml:id="memcache.ini" xmlns="http://docbook.org/ns/docbook">
|
||||
<section xmlns="http://docbook.org/ns/docbook" xml:id="memcache.ini">
|
||||
&reftitle.runtime;
|
||||
&extension.runtime;
|
||||
<para>
|
||||
@@ -117,186 +117,183 @@
|
||||
|
||||
&ini.descriptions.title;
|
||||
|
||||
<para>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry xml:id="ini.memcache.allow-failover">
|
||||
<term>
|
||||
<parameter>memcache.allow_failover</parameter>
|
||||
<type>bool</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Whether to transparently failover to other servers on
|
||||
errors.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.memcache.max-failover-attempts">
|
||||
<term>
|
||||
<parameter>memcache.max_failover_attempts</parameter>
|
||||
<type>int</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Defines how many servers to try when setting and getting data.
|
||||
Used only in conjunction with memcache.allow_failover.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.memcache.chunk-size">
|
||||
<term>
|
||||
<parameter>memcache.chunk_size</parameter>
|
||||
<type>int</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Data will be transferred in chunks of this size, setting
|
||||
the value lower requires more network writes. Try
|
||||
increasing this value to 32768 if noticing otherwise
|
||||
inexplicable slowdowns.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.memcache.default-port">
|
||||
<term>
|
||||
<parameter>memcache.default_port</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The default TCP port number to use when connecting to
|
||||
the memcached server if no other port is specified.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry xml:id="ini.memcache.hash-strategy">
|
||||
<term>
|
||||
<parameter>memcache.hash_strategy</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls which strategy to use when mapping keys to servers. Set this value to
|
||||
<literal>consistent</literal> to enable consistent hashing which allows servers
|
||||
to be added or removed from the pool without causing keys to be remapped.
|
||||
Setting this value to <literal>standard</literal> results in the old strategy
|
||||
being used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.memcache.hash-function">
|
||||
<term>
|
||||
<parameter>memcache.hash_function</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls which hash function to apply when mapping keys to servers, <literal>crc32</literal>
|
||||
uses the standard CRC32 hash while <literal>fnv</literal> uses FNV-1a.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.memcache.allow-failover">
|
||||
<term>
|
||||
<parameter>memcache.allow_failover</parameter>
|
||||
<type>bool</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Whether to transparently failover to other servers on
|
||||
errors.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.memcache.protocol">
|
||||
<term>
|
||||
<parameter>memcache.protocol</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.memcache.max-failover-attempts">
|
||||
<term>
|
||||
<parameter>memcache.max_failover_attempts</parameter>
|
||||
<type>int</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Defines how many servers to try when setting and getting data.
|
||||
Used only in conjunction with memcache.allow_failover.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.memcache.redundancy">
|
||||
<term>
|
||||
<parameter>memcache.redundancy</parameter>
|
||||
<type>int</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.memcache.chunk-size">
|
||||
<term>
|
||||
<parameter>memcache.chunk_size</parameter>
|
||||
<type>int</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Data will be transferred in chunks of this size, setting
|
||||
the value lower requires more network writes. Try
|
||||
increasing this value to 32768 if noticing otherwise
|
||||
inexplicable slowdowns.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.memcache.session-redundancy">
|
||||
<term>
|
||||
<parameter>memcache.session_redundancy</parameter>
|
||||
<type>int</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.memcache.default-port">
|
||||
<term>
|
||||
<parameter>memcache.default_port</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The default TCP port number to use when connecting to
|
||||
the memcached server if no other port is specified.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.memcache.compress-threshold">
|
||||
<term>
|
||||
<parameter>memcache.compress_threshold</parameter>
|
||||
<type>int</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.memcache.hash-strategy">
|
||||
<term>
|
||||
<parameter>memcache.hash_strategy</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls which strategy to use when mapping keys to servers. Set this value to
|
||||
<literal>consistent</literal> to enable consistent hashing which allows servers
|
||||
to be added or removed from the pool without causing keys to be remapped.
|
||||
Setting this value to <literal>standard</literal> results in the old strategy
|
||||
being used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.memcache.lock-timeout">
|
||||
<term>
|
||||
<parameter>memcache.lock_timeout</parameter>
|
||||
<type>int</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.memcache.hash-function">
|
||||
<term>
|
||||
<parameter>memcache.hash_function</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls which hash function to apply when mapping keys to servers, <literal>crc32</literal>
|
||||
uses the standard CRC32 hash while <literal>fnv</literal> uses FNV-1a.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.memcache.save-handler">
|
||||
<term>
|
||||
<parameter>session.save_handler</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use memcache as a session handler by setting this value to <literal>memcache</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.memcache.protocol">
|
||||
<term>
|
||||
<parameter>memcache.protocol</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
<varlistentry xml:id="ini.memcache.save-path">
|
||||
<term>
|
||||
<parameter>session.save_path</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Defines a comma separated of server urls to use for session storage, for example
|
||||
<literal>"tcp://host1:11211, tcp://host2:11211"</literal>.
|
||||
</para>
|
||||
<para>
|
||||
Each url may contain parameters which are applied to that server, they are the same
|
||||
as for the <function>Memcache::addServer</function> method. For example
|
||||
<literal>"tcp://host1:11211?persistent=1&weight=1&timeout=1&retry_interval=15"</literal>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
<varlistentry xml:id="ini.memcache.redundancy">
|
||||
<term>
|
||||
<parameter>memcache.redundancy</parameter>
|
||||
<type>int</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.memcache.session-redundancy">
|
||||
<term>
|
||||
<parameter>memcache.session_redundancy</parameter>
|
||||
<type>int</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.memcache.compress-threshold">
|
||||
<term>
|
||||
<parameter>memcache.compress_threshold</parameter>
|
||||
<type>int</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.memcache.lock-timeout">
|
||||
<term>
|
||||
<parameter>memcache.lock_timeout</parameter>
|
||||
<type>int</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.memcache.save-handler">
|
||||
<term>
|
||||
<parameter>session.save_handler</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use memcache as a session handler by setting this value to <literal>memcache</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.memcache.save-path">
|
||||
<term>
|
||||
<parameter>session.save_path</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Defines a comma separated of server urls to use for session storage, for example
|
||||
<literal>"tcp://host1:11211, tcp://host2:11211"</literal>.
|
||||
</para>
|
||||
<para>
|
||||
Each url may contain parameters which are applied to that server, they are the same
|
||||
as for the <function>Memcache::addServer</function> method. For example
|
||||
<literal>"tcp://host1:11211?persistent=1&weight=1&timeout=1&retry_interval=15"</literal>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</section>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="memcache.add" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="memcache.add">
|
||||
<refnamediv>
|
||||
<refname>Memcache::add</refname>
|
||||
<refname>memcache_add</refname>
|
||||
@@ -24,10 +24,10 @@
|
||||
<methodparam choice="opt"><type>int</type><parameter>flag</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>expire</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
|
||||
<para>
|
||||
<function>Memcache::add</function> stores variable
|
||||
<parameter>var</parameter> with <parameter>key</parameter> only if such
|
||||
<parameter>var</parameter> with <parameter>key</parameter> only if such
|
||||
key doesn't exist at the server yet.
|
||||
</para>
|
||||
|
||||
@@ -35,47 +35,45 @@
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The key that will be associated with the item.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>var</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The variable to store. Strings and integers are stored as is, other
|
||||
types are stored serialized.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>flag</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use <constant>MEMCACHE_COMPRESSED</constant> to store the item
|
||||
compressed (uses zlib).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>expire</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Expiration time of the item. If it's equal to zero, the item will never
|
||||
expire. You can also use Unix timestamp or a number of seconds starting
|
||||
from current time, but in the latter case the number of seconds may not
|
||||
exceed 2592000 (30 days).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The key that will be associated with the item.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>var</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The variable to store. Strings and integers are stored as is, other
|
||||
types are stored serialized.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>flag</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use <constant>MEMCACHE_COMPRESSED</constant> to store the item
|
||||
compressed (uses zlib).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>expire</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Expiration time of the item. If it's equal to zero, the item will never
|
||||
expire. You can also use Unix timestamp or a number of seconds starting
|
||||
from current time, but in the latter case the number of seconds may not
|
||||
exceed 2592000 (30 days).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
@@ -90,10 +88,9 @@
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>Memcache::add</function> example</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title><function>Memcache::add</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -107,23 +104,19 @@ $memcache_obj->add('var_key', 'test variable', false, 30);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::set</function></member>
|
||||
<member><function>Memcache::replace</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::set</function></member>
|
||||
<member><function>Memcache::replace</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="memcache.addserver" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="memcache.addserver">
|
||||
<refnamediv>
|
||||
<refname>Memcache::addServer</refname>
|
||||
<refname>memcache_add_server</refname>
|
||||
<refpurpose>Add a memcached server to connection pool</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
@@ -34,23 +34,23 @@
|
||||
<methodparam choice="opt"><type>callable</type><parameter>failure_callback</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>timeoutms</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
|
||||
<para>
|
||||
<function>Memcache::addServer</function> adds a server to the connection pool.
|
||||
<function>Memcache::addServer</function> adds a server to the connection pool.
|
||||
</para>
|
||||
|
||||
|
||||
<para>
|
||||
When using this method (as opposed to <function>Memcache::connect</function> and
|
||||
<function>Memcache::pconnect</function>) the network connection is not established
|
||||
until actually needed. Thus there is no overhead in adding a large number of servers
|
||||
When using this method (as opposed to <function>Memcache::connect</function> and
|
||||
<function>Memcache::pconnect</function>) the network connection is not established
|
||||
until actually needed. Thus there is no overhead in adding a large number of servers
|
||||
to the pool, even though they might not all be used.
|
||||
</para>
|
||||
|
||||
|
||||
<para>
|
||||
Failover may occur at any stage in any of the methods, as long as other
|
||||
servers are available the request the user won't notice. Any kind of
|
||||
socket or Memcached server level errors (except out-of-memory) may trigger
|
||||
the failover. Normal client errors such as adding an existing key will not
|
||||
Failover may occur at any stage in any of the methods, as long as other
|
||||
servers are available the request the user won't notice. Any kind of
|
||||
socket or Memcached server level errors (except out-of-memory) may trigger
|
||||
the failover. Normal client errors such as adding an existing key will not
|
||||
trigger a failover.
|
||||
</para>
|
||||
|
||||
@@ -64,115 +64,113 @@
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>host</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Point to the host where memcached is listening for connections. This parameter
|
||||
may also specify other transports like <literal>unix:///path/to/memcached.sock</literal>
|
||||
to use UNIX domain sockets, in this case <parameter>port</parameter> must also
|
||||
be set to <literal>0</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>port</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Point to the port where memcached is listening for connections.
|
||||
Set this
|
||||
parameter to <literal>0</literal> when using UNIX domain sockets.
|
||||
</para>
|
||||
<para>
|
||||
Please note: <parameter>port</parameter> defaults to
|
||||
<link linkend="ini.memcache.default-port">memcache.default_port</link>
|
||||
if not specified. For this reason it is wise to specify the port
|
||||
explicitly in this method call.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>persistent</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls the use of a persistent connection. Default to &true;.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>weight</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Number of buckets to create for this server which in turn control its
|
||||
probability of it being selected. The probability is relative to the
|
||||
total weight of all servers.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>timeout</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Value in seconds which will be used for connecting to the daemon. Think
|
||||
twice before changing the default value of 1 second - you can lose all
|
||||
the advantages of caching if your connection is too slow.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>retry_interval</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls how often a failed server will be retried, the default value
|
||||
is 15 seconds. Setting this parameter to -1 disables automatic retry.
|
||||
Neither this nor the <parameter>persistent</parameter> parameter has any
|
||||
effect when the extension is loaded dynamically via <function>dl</function>.
|
||||
</para>
|
||||
<para>
|
||||
Each failed connection struct has its own timeout and before it has expired
|
||||
the struct will be skipped when selecting backends to serve a request. Once
|
||||
expired the connection will be successfully reconnected or marked as failed
|
||||
for another <parameter>retry_interval</parameter> seconds. The typical
|
||||
effect is that each web server child will retry the connection about every
|
||||
<parameter>retry_interval</parameter> seconds when serving a page.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>status</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls if the server should be flagged as online. Setting this parameter
|
||||
to &false; and <parameter>retry_interval</parameter> to -1 allows a failed
|
||||
server to be kept in the pool so as not to affect the key distribution
|
||||
algorithm. Requests for this server will then failover or fail immediately
|
||||
depending on the <parameter>memcache.allow_failover</parameter> setting.
|
||||
Default to &true;, meaning the server should be considered online.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>failure_callback</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Allows the user to specify a callback function to run upon encountering an
|
||||
error. The callback is run before failover is attempted. The function takes
|
||||
two parameters, the hostname and port of the failed server.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>timeoutms</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>host</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Point to the host where memcached is listening for connections. This parameter
|
||||
may also specify other transports like <literal>unix:///path/to/memcached.sock</literal>
|
||||
to use UNIX domain sockets, in this case <parameter>port</parameter> must also
|
||||
be set to <literal>0</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>port</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Point to the port where memcached is listening for connections.
|
||||
Set this
|
||||
parameter to <literal>0</literal> when using UNIX domain sockets.
|
||||
</para>
|
||||
<para>
|
||||
Please note: <parameter>port</parameter> defaults to
|
||||
<link linkend="ini.memcache.default-port">memcache.default_port</link>
|
||||
if not specified. For this reason it is wise to specify the port
|
||||
explicitly in this method call.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>persistent</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls the use of a persistent connection. Default to &true;.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>weight</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Number of buckets to create for this server which in turn control its
|
||||
probability of it being selected. The probability is relative to the
|
||||
total weight of all servers.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>timeout</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Value in seconds which will be used for connecting to the daemon. Think
|
||||
twice before changing the default value of 1 second - you can lose all
|
||||
the advantages of caching if your connection is too slow.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>retry_interval</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls how often a failed server will be retried, the default value
|
||||
is 15 seconds. Setting this parameter to -1 disables automatic retry.
|
||||
Neither this nor the <parameter>persistent</parameter> parameter has any
|
||||
effect when the extension is loaded dynamically via <function>dl</function>.
|
||||
</para>
|
||||
<para>
|
||||
Each failed connection struct has its own timeout and before it has expired
|
||||
the struct will be skipped when selecting backends to serve a request. Once
|
||||
expired the connection will be successfully reconnected or marked as failed
|
||||
for another <parameter>retry_interval</parameter> seconds. The typical
|
||||
effect is that each web server child will retry the connection about every
|
||||
<parameter>retry_interval</parameter> seconds when serving a page.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>status</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls if the server should be flagged as online. Setting this parameter
|
||||
to &false; and <parameter>retry_interval</parameter> to -1 allows a failed
|
||||
server to be kept in the pool so as not to affect the key distribution
|
||||
algorithm. Requests for this server will then failover or fail immediately
|
||||
depending on the <parameter>memcache.allow_failover</parameter> setting.
|
||||
Default to &true;, meaning the server should be considered online.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>failure_callback</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Allows the user to specify a callback function to run upon encountering an
|
||||
error. The callback is run before failover is attempted. The function takes
|
||||
two parameters, the hostname and port of the failed server.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>timeoutms</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
@@ -184,10 +182,9 @@
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>Memcache::addServer</function> example</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title><function>Memcache::addServer</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -204,9 +201,8 @@ memcache_add_server($memcache_obj, 'memcache_host2', 11211);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="notes">
|
||||
@@ -225,19 +221,16 @@ memcache_add_server($memcache_obj, 'memcache_host2', 11211);
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::connect</function></member>
|
||||
<member><function>Memcache::pconnect</function></member>
|
||||
<member><function>Memcache::close</function></member>
|
||||
<member><function>Memcache::setServerParams</function></member>
|
||||
<member><function>Memcache::getServerStatus</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::connect</function></member>
|
||||
<member><function>Memcache::pconnect</function></member>
|
||||
<member><function>Memcache::close</function></member>
|
||||
<member><function>Memcache::setServerParams</function></member>
|
||||
<member><function>Memcache::getServerStatus</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="memcache.close" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="memcache.close">
|
||||
<refnamediv>
|
||||
<refname>Memcache::close</refname>
|
||||
<refname>memcache_close</refname>
|
||||
@@ -40,16 +40,15 @@
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>Memcache::close</function> example</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title><function>Memcache::close</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
/* procedural API */
|
||||
$memcache_obj = memcache_connect('memcache_host', 11211);
|
||||
/*
|
||||
/*
|
||||
do something here...
|
||||
*/
|
||||
memcache_close($memcache_obj);
|
||||
@@ -57,30 +56,26 @@ memcache_close($memcache_obj);
|
||||
/* OO API */
|
||||
$memcache_obj = new Memcache;
|
||||
$memcache_obj->connect('memcache_host', 11211);
|
||||
/*
|
||||
/*
|
||||
do something here...
|
||||
*/
|
||||
$memcache_obj->close();
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::connect</function></member>
|
||||
<member><function>Memcache::pconnect</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::connect</function></member>
|
||||
<member><function>Memcache::pconnect</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="memcache.connect" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="memcache.connect">
|
||||
<refnamediv>
|
||||
<refname>Memcache::connect</refname>
|
||||
<refname>memcache_connect</refname>
|
||||
@@ -30,51 +30,49 @@
|
||||
end of script execution. Also you can close it with
|
||||
<function>Memcache::close</function>.
|
||||
</para>
|
||||
|
||||
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>host</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Point to the host where memcached is listening for connections. This parameter
|
||||
may also specify other transports like <literal>unix:///path/to/memcached.sock</literal>
|
||||
to use UNIX domain sockets, in this case <parameter>port</parameter> must also
|
||||
be set to <literal>0</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>port</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Point to the port where memcached is listening for connections. Set this
|
||||
parameter to <literal>0</literal> when using UNIX domain sockets.
|
||||
</para>
|
||||
<para>
|
||||
Please note: <parameter>port</parameter> defaults to
|
||||
<link linkend="ini.memcache.default-port">memcache.default_port</link>
|
||||
if not specified. For this reason it is wise to specify the port
|
||||
explicitly in this method call.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>timeout</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Value in seconds which will be used for connecting to the daemon. Think
|
||||
twice before changing the default value of 1 second - you can lose all
|
||||
the advantages of caching if your connection is too slow.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>host</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Point to the host where memcached is listening for connections. This parameter
|
||||
may also specify other transports like <literal>unix:///path/to/memcached.sock</literal>
|
||||
to use UNIX domain sockets, in this case <parameter>port</parameter> must also
|
||||
be set to <literal>0</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>port</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Point to the port where memcached is listening for connections. Set this
|
||||
parameter to <literal>0</literal> when using UNIX domain sockets.
|
||||
</para>
|
||||
<para>
|
||||
Please note: <parameter>port</parameter> defaults to
|
||||
<link linkend="ini.memcache.default-port">memcache.default_port</link>
|
||||
if not specified. For this reason it is wise to specify the port
|
||||
explicitly in this method call.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>timeout</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Value in seconds which will be used for connecting to the daemon. Think
|
||||
twice before changing the default value of 1 second - you can lose all
|
||||
the advantages of caching if your connection is too slow.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
@@ -86,10 +84,9 @@
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>Memcache::connect</function> example</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title><function>Memcache::connect</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -104,9 +101,8 @@ $memcache->connect('memcache_host', 11211);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="notes">
|
||||
@@ -125,16 +121,13 @@ $memcache->connect('memcache_host', 11211);
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::pconnect</function></member>
|
||||
<member><function>Memcache::close</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::pconnect</function></member>
|
||||
<member><function>Memcache::close</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="memcache.decrement" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="memcache.decrement">
|
||||
<refnamediv>
|
||||
<refname>Memcache::decrement</refname>
|
||||
<refname>memcache_decrement</refname>
|
||||
@@ -22,11 +22,11 @@
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<function>Memcache::decrement</function> decrements value of the
|
||||
item by <parameter>value</parameter>. Similarly to
|
||||
<function>Memcache::decrement</function> decrements value of the
|
||||
item by <parameter>value</parameter>. Similarly to
|
||||
<function>Memcache::increment</function>, current value of the item is
|
||||
being converted to numerical and after that <parameter>value</parameter>
|
||||
is subtracted.
|
||||
is subtracted.
|
||||
<note>
|
||||
<para>
|
||||
New item's value will not be less than zero.
|
||||
@@ -35,7 +35,7 @@
|
||||
<note>
|
||||
<para>
|
||||
Do not use <function>Memcache::decrement</function> with item, which was
|
||||
stored compressed, because consequent call to
|
||||
stored compressed, because consequent call to
|
||||
<function>Memcache::get</function> will fail.
|
||||
</para>
|
||||
</note>
|
||||
@@ -47,26 +47,24 @@
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Key of the item do decrement.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Decrement the item by <parameter>value</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Key of the item do decrement.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Decrement the item by <parameter>value</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
@@ -78,10 +76,9 @@
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>Memcache::decrement</function> example</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title><function>Memcache::decrement</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -97,23 +94,19 @@ $memcache_obj->connect('memcache_host', 11211);
|
||||
$new_value = $memcache_obj->decrement('test_item', 3);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::increment</function></member>
|
||||
<member><function>Memcache::replace</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::increment</function></member>
|
||||
<member><function>Memcache::replace</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="memcache.delete" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="memcache.delete">
|
||||
<refnamediv>
|
||||
<refname>Memcache::delete</refname>
|
||||
<refname>memcache_delete</refname>
|
||||
<refpurpose>Delete item from the server</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
@@ -22,34 +22,32 @@
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<function>Memcache::delete</function> deletes an item with the <parameter>key</parameter>.
|
||||
<function>Memcache::delete</function> deletes an item with the <parameter>key</parameter>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The key associated with the item to delete.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>exptime</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
This deprecated parameter is not supported, and defaults to <literal>0</literal> seconds.
|
||||
Do not use this parameter.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The key associated with the item to delete.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>exptime</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
This deprecated parameter is not supported, and defaults to <literal>0</literal> seconds.
|
||||
Do not use this parameter.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
@@ -84,10 +82,9 @@
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>Memcache::delete</function> example</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title><function>Memcache::delete</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -105,23 +102,19 @@ $memcache_obj->delete('key_to_delete');
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::set</function></member>
|
||||
<member><function>Memcache::replace</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::set</function></member>
|
||||
<member><function>Memcache::replace</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="memcache.flush" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="memcache.flush">
|
||||
<refnamediv>
|
||||
<refname>Memcache::flush</refname>
|
||||
<refname>memcache_flush</refname>
|
||||
@@ -19,7 +19,7 @@
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<function>Memcache::flush</function> immediately invalidates all
|
||||
<function>Memcache::flush</function> immediately invalidates all
|
||||
existing items. <function>Memcache::flush</function> doesn't
|
||||
actually free any resources, it only marks all the items as expired, so
|
||||
occupied memory will be overwritten by new items.
|
||||
@@ -31,7 +31,7 @@
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
@@ -41,10 +41,9 @@
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>Memcache::flush</function> example</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title><function>Memcache::flush</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -62,13 +61,11 @@ $memcache_obj->flush();
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="memcache.get" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="memcache.get">
|
||||
<refnamediv>
|
||||
<refname>Memcache::get</refname>
|
||||
<refname>memcache_get</refname>
|
||||
@@ -31,7 +31,7 @@
|
||||
<methodparam><type>array</type><parameter>keys</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter role="reference">flags</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
|
||||
<para>
|
||||
<function>Memcache::get</function> returns previously stored data of
|
||||
an item, if such <parameter>key</parameter> exists on the server at this
|
||||
@@ -42,34 +42,32 @@
|
||||
You can pass array of keys to <function>Memcache::get</function> to get
|
||||
array of values. The result array will contain only found key-value pairs.
|
||||
</para>
|
||||
|
||||
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The key or array of keys to fetch.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If present, flags fetched along with the values will be written to this parameter. These
|
||||
flags are the same as the ones given to for example <function>Memcache::set</function>.
|
||||
The lowest byte of the int is reserved for pecl/memcache internal usage (e.g. to indicate
|
||||
compression and serialization status).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The key or array of keys to fetch.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If present, flags fetched along with the values will be written to this parameter. These
|
||||
flags are the same as the ones given to for example <function>Memcache::set</function>.
|
||||
The lowest byte of the int is reserved for pecl/memcache internal usage (e.g. to indicate
|
||||
compression and serialization status).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
@@ -84,10 +82,9 @@
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>Memcache::get</function> example</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title><function>Memcache::get</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -100,7 +97,7 @@ $memcache_obj = new Memcache;
|
||||
$memcache_obj->connect('memcache_host', 11211);
|
||||
$var = $memcache_obj->get('some_key');
|
||||
|
||||
/*
|
||||
/*
|
||||
You also can use array of keys as a parameter.
|
||||
If such item wasn't found at the server, the result
|
||||
array simply will not include such key.
|
||||
@@ -117,13 +114,11 @@ $var = $memcache_obj->get(Array('some_key', 'second_key'));
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="memcache.getextendedstats" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="memcache.getextendedstats">
|
||||
<refnamediv>
|
||||
<refname>Memcache::getExtendedStats</refname>
|
||||
<refname>memcache_get_extended_stats</refname>
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<para>
|
||||
<function>Memcache::getExtendedStats</function> returns a two-dimensional
|
||||
associative array with server statistics. Array keys correspond to
|
||||
associative array with server statistics. Array keys correspond to
|
||||
host:port of server and values contain the individual server statistics.
|
||||
A failed server will have its corresponding entry set to &false;.
|
||||
</para>
|
||||
@@ -35,7 +35,7 @@
|
||||
This function has been added to Memcache version 2.0.0.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
@@ -46,9 +46,9 @@
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The type of statistics to fetch. Valid values are {reset,
|
||||
The type of statistics to fetch. Valid values are {reset,
|
||||
malloc, maps, cachedump, slabs, items, sizes}. According to
|
||||
the memcached protocol spec these additional arguments "are
|
||||
the memcached protocol spec these additional arguments "are
|
||||
subject to change for the convenience of memcache developers".
|
||||
</para>
|
||||
</listitem>
|
||||
@@ -57,9 +57,9 @@
|
||||
<term><parameter>slabid</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Used in conjunction with <parameter>type</parameter> set to
|
||||
Used in conjunction with <parameter>type</parameter> set to
|
||||
cachedump to identify the slab to dump from. The cachedump
|
||||
command ties up the server and is strictly to be used for
|
||||
command ties up the server and is strictly to be used for
|
||||
debugging purposes.
|
||||
</para>
|
||||
</listitem>
|
||||
@@ -68,7 +68,7 @@
|
||||
<term><parameter>limit</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Used in conjunction with <parameter>type</parameter> set to
|
||||
Used in conjunction with <parameter>type</parameter> set to
|
||||
cachedump to limit the number of entries to dump.
|
||||
</para>
|
||||
</listitem>
|
||||
@@ -94,23 +94,22 @@
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>Memcache::getExtendedStats</function> example</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title><function>Memcache::getExtendedStats</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$memcache_obj = new Memcache;
|
||||
$memcache_obj->addServer('memcache_host', 11211);
|
||||
$memcache_obj->addServer('failed_host', 11211);
|
||||
|
||||
|
||||
$stats = $memcache_obj->getExtendedStats();
|
||||
print_r($stats);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Array
|
||||
(
|
||||
@@ -140,23 +139,19 @@ Array
|
||||
[failed_host:11211] => false
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::getVersion</function></member>
|
||||
<member><function>Memcache::getStats</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::getVersion</function></member>
|
||||
<member><function>Memcache::getStats</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="memcache.getserverstatus" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="memcache.getserverstatus">
|
||||
<refnamediv>
|
||||
<refname>Memcache::getServerStatus</refname>
|
||||
<refname>memcache_get_server_status</refname>
|
||||
@@ -22,7 +22,7 @@
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<function>Memcache::getServerStatus</function> returns a the servers
|
||||
<function>Memcache::getServerStatus</function> returns a the servers
|
||||
online/offline status.
|
||||
</para>
|
||||
|
||||
@@ -36,26 +36,24 @@
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>host</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Point to the host where memcached is listening for connections.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>port</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Point to the port where memcached is listening for connections.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>host</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Point to the host where memcached is listening for connections.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>port</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Point to the port where memcached is listening for connections.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
@@ -67,10 +65,9 @@
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>Memcache::getServerStatus</function> example</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title><function>Memcache::getServerStatus</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -85,23 +82,19 @@ echo memcache_get_server_status($memcache, 'memcache_host', 11211);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::addServer</function></member>
|
||||
<member><function>Memcache::setServerParams</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::addServer</function></member>
|
||||
<member><function>Memcache::setServerParams</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="memcache.getstats" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="memcache.getstats">
|
||||
<refnamediv>
|
||||
<refname>Memcache::getStats</refname>
|
||||
<refname>memcache_get_stats</refname>
|
||||
@@ -24,8 +24,8 @@
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<function>Memcache::getStats</function> returns an associative array
|
||||
with server's statistics. Array keys correspond to stats parameters and
|
||||
<function>Memcache::getStats</function> returns an associative array
|
||||
with server's statistics. Array keys correspond to stats parameters and
|
||||
values to parameter's values.
|
||||
</para>
|
||||
|
||||
@@ -33,41 +33,39 @@
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The type of statistics to fetch. Valid values are {reset,
|
||||
malloc, maps, cachedump, slabs, items, sizes}. According to
|
||||
the memcached protocol spec these additional arguments "are
|
||||
subject to change for the convenience of memcache developers".
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>slabid</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Used in conjunction with <parameter>type</parameter> set to
|
||||
cachedump to identify the slab to dump from. The cachedump
|
||||
command ties up the server and is strictly to be used for
|
||||
debugging purposes.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>limit</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Used in conjunction with <parameter>type</parameter> set to
|
||||
cachedump to limit the number of entries to dump.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The type of statistics to fetch. Valid values are {reset,
|
||||
malloc, maps, cachedump, slabs, items, sizes}. According to
|
||||
the memcached protocol spec these additional arguments "are
|
||||
subject to change for the convenience of memcache developers".
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>slabid</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Used in conjunction with <parameter>type</parameter> set to
|
||||
cachedump to identify the slab to dump from. The cachedump
|
||||
command ties up the server and is strictly to be used for
|
||||
debugging purposes.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>limit</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Used in conjunction with <parameter>type</parameter> set to
|
||||
cachedump to limit the number of entries to dump.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
@@ -79,16 +77,13 @@
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::getVersion</function></member>
|
||||
<member><function>Memcache::getExtendedStats</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::getVersion</function></member>
|
||||
<member><function>Memcache::getExtendedStats</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="memcache.getversion" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="memcache.getversion">
|
||||
<refnamediv>
|
||||
<refname>Memcache::getVersion</refname>
|
||||
<refname>memcache_get_version</refname>
|
||||
@@ -39,10 +39,9 @@
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>Memcache::getVersion</function> example</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title><function>Memcache::getVersion</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -57,23 +56,19 @@ echo memcache_get_version($memcache);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::getExtendedStats</function></member>
|
||||
<member><function>Memcache::getStats</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::getExtendedStats</function></member>
|
||||
<member><function>Memcache::getStats</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="memcache.increment" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="memcache.increment">
|
||||
<refnamediv>
|
||||
<refname>Memcache::increment</refname>
|
||||
<refname>memcache_increment</refname>
|
||||
@@ -30,8 +30,8 @@
|
||||
create an item if it doesn't already exist.
|
||||
<note>
|
||||
<para>
|
||||
Do not use <function>Memcache::increment</function> with items that have been
|
||||
stored compressed because subsequent calls to
|
||||
Do not use <function>Memcache::increment</function> with items that have been
|
||||
stored compressed because subsequent calls to
|
||||
<function>Memcache::get</function> will fail.
|
||||
</para>
|
||||
</note>
|
||||
@@ -41,26 +41,24 @@
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Key of the item to increment.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Increment the item by <parameter>value</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Key of the item to increment.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Increment the item by <parameter>value</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
@@ -72,10 +70,9 @@
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>Memcache::increment</function> example</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title><function>Memcache::increment</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -92,23 +89,19 @@ $current_value = $memcache_obj->increment('counter', 3);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::decrement</function></member>
|
||||
<member><function>Memcache::replace</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::decrement</function></member>
|
||||
<member><function>Memcache::replace</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="memcache.pconnect" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="memcache.pconnect">
|
||||
<refnamediv>
|
||||
<refname>Memcache::pconnect</refname>
|
||||
<refname>memcache_pconnect</refname>
|
||||
@@ -24,9 +24,9 @@
|
||||
|
||||
<para>
|
||||
<function>Memcache::pconnect</function> is similar to
|
||||
<function>Memcache::connect</function> with the difference, that
|
||||
<function>Memcache::connect</function> with the difference, that
|
||||
the connection it establishes is persistent.
|
||||
This connection is not closed after the end of script execution and
|
||||
This connection is not closed after the end of script execution and
|
||||
by <function>Memcache::close</function> function.
|
||||
</para>
|
||||
|
||||
@@ -34,40 +34,38 @@
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>host</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Point to the host where memcached is listening for connections. This parameter
|
||||
may also specify other transports like <literal>unix:///path/to/memcached.sock</literal>
|
||||
to use UNIX domain sockets, in this case <parameter>port</parameter> must also
|
||||
be set to <literal>0</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>port</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Point to the port where memcached is listening for connections. Set this
|
||||
parameter to <literal>0</literal> when using UNIX domain sockets.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>timeout</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Value in seconds which will be used for connecting to the daemon. Think
|
||||
twice before changing the default value of 1 second - you can lose all
|
||||
the advantages of caching if your connection is too slow.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>host</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Point to the host where memcached is listening for connections. This parameter
|
||||
may also specify other transports like <literal>unix:///path/to/memcached.sock</literal>
|
||||
to use UNIX domain sockets, in this case <parameter>port</parameter> must also
|
||||
be set to <literal>0</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>port</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Point to the port where memcached is listening for connections. Set this
|
||||
parameter to <literal>0</literal> when using UNIX domain sockets.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>timeout</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Value in seconds which will be used for connecting to the daemon. Think
|
||||
twice before changing the default value of 1 second - you can lose all
|
||||
the advantages of caching if your connection is too slow.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
@@ -79,10 +77,9 @@
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>Memcache::pconnect</function> example</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title><function>Memcache::pconnect</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -96,22 +93,18 @@ $memcache_obj->pconnect('memcache_host', 11211);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::connect</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::connect</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="memcache.replace" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="memcache.replace">
|
||||
<refnamediv>
|
||||
<refname>Memcache::replace</refname>
|
||||
<refname>memcache_replace</refname>
|
||||
@@ -37,49 +37,47 @@
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The key that will be associated with the item.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>var</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The variable to store. Strings and integers are stored as is, other
|
||||
types are stored serialized.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>flag</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use <constant>MEMCACHE_COMPRESSED</constant> to store the item
|
||||
compressed (uses zlib).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>expire</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Expiration time of the item. If it's equal to zero, the item will never
|
||||
expire. You can also use Unix timestamp or a number of seconds starting
|
||||
from current time, but in the latter case the number of seconds may not
|
||||
exceed 2592000 (30 days).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The key that will be associated with the item.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>var</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The variable to store. Strings and integers are stored as is, other
|
||||
types are stored serialized.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>flag</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use <constant>MEMCACHE_COMPRESSED</constant> to store the item
|
||||
compressed (uses zlib).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>expire</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Expiration time of the item. If it's equal to zero, the item will never
|
||||
expire. You can also use Unix timestamp or a number of seconds starting
|
||||
from current time, but in the latter case the number of seconds may not
|
||||
exceed 2592000 (30 days).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
@@ -89,10 +87,9 @@
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>Memcache::replace</function> example</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title><function>Memcache::replace</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -106,23 +103,19 @@ $memcache_obj->replace("test_key", "some variable", false, 30);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::set</function></member>
|
||||
<member><function>Memcache::add</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::set</function></member>
|
||||
<member><function>Memcache::add</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="memcache.set" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="memcache.set">
|
||||
<refnamediv>
|
||||
<refname>Memcache::set</refname>
|
||||
<refname>memcache_set</refname>
|
||||
@@ -26,13 +26,13 @@
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<function>Memcache::set</function> stores an item
|
||||
<parameter>var</parameter> with <parameter>key</parameter> on the
|
||||
memcached server. Parameter <parameter>expire</parameter> is expiration
|
||||
time in seconds. If it's 0, the item never expires (but memcached server
|
||||
doesn't guarantee this item to be stored all the time, it could be deleted
|
||||
<function>Memcache::set</function> stores an item
|
||||
<parameter>var</parameter> with <parameter>key</parameter> on the
|
||||
memcached server. Parameter <parameter>expire</parameter> is expiration
|
||||
time in seconds. If it's 0, the item never expires (but memcached server
|
||||
doesn't guarantee this item to be stored all the time, it could be deleted
|
||||
from the cache to make place for other items).
|
||||
You can use <constant>MEMCACHE_COMPRESSED</constant> constant as
|
||||
You can use <constant>MEMCACHE_COMPRESSED</constant> constant as
|
||||
<parameter>flag</parameter> value if you want to use on-the-fly
|
||||
compression (uses zlib).
|
||||
<note>
|
||||
@@ -40,7 +40,7 @@
|
||||
Remember that resource variables (i.e. file and connection descriptors)
|
||||
cannot be stored in the cache, because they cannot be adequately
|
||||
represented in serialized state.
|
||||
</para>
|
||||
</para>
|
||||
</note>
|
||||
</para>
|
||||
|
||||
@@ -48,49 +48,47 @@
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The key that will be associated with the item.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>var</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The variable to store. Strings and integers are stored as is, other
|
||||
types are stored serialized.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>flag</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use <constant>MEMCACHE_COMPRESSED</constant> to store the item
|
||||
compressed (uses zlib).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>expire</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Expiration time of the item. If it's equal to zero, the item will never
|
||||
expire. You can also use Unix timestamp or a number of seconds starting
|
||||
from current time, but in the latter case the number of seconds may not
|
||||
exceed 2592000 (30 days).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The key that will be associated with the item.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>var</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The variable to store. Strings and integers are stored as is, other
|
||||
types are stored serialized.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>flag</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use <constant>MEMCACHE_COMPRESSED</constant> to store the item
|
||||
compressed (uses zlib).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>expire</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Expiration time of the item. If it's equal to zero, the item will never
|
||||
expire. You can also use Unix timestamp or a number of seconds starting
|
||||
from current time, but in the latter case the number of seconds may not
|
||||
exceed 2592000 (30 days).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
@@ -153,15 +151,12 @@ echo $memcache_obj->get('var_key');
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::add</function></member>
|
||||
<member><function>Memcache::replace</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::add</function></member>
|
||||
<member><function>Memcache::replace</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="memcache.setcompressthreshold" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="memcache.setcompressthreshold">
|
||||
<refnamediv>
|
||||
<refname>Memcache::setCompressThreshold</refname>
|
||||
<refname>memcache_set_compress_threshold</refname>
|
||||
@@ -31,33 +31,31 @@
|
||||
This function has been added to Memcache version 2.0.0.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>threshold</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls the minimum value length before attempting to compress automatically.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>min_saving</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the minimum amount of savings to actually store the value
|
||||
compressed. The supplied value must be between 0 and 1. Default value
|
||||
is 0.2 giving a minimum 20% compression savings.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>threshold</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls the minimum value length before attempting to compress automatically.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>min_saving</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the minimum amount of savings to actually store the value
|
||||
compressed. The supplied value must be between 0 and 1. Default value
|
||||
is 0.2 giving a minimum 20% compression savings.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
@@ -69,10 +67,9 @@
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>Memcache::setCompressThreshold</function> example</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title><function>Memcache::setCompressThreshold</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -89,13 +86,11 @@ memcache_set_compress_threshold($memcache_obj, 20000, 0.2);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="memcache.setserverparams" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="memcache.setserverparams">
|
||||
<refnamediv>
|
||||
<refname>Memcache::setServerParams</refname>
|
||||
<refname>memcache_set_server_params</refname>
|
||||
<refpurpose>Changes server parameters and status at runtime</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
@@ -28,11 +28,11 @@
|
||||
<methodparam choice="opt"><type>bool</type><parameter>status</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>callable</type><parameter>failure_callback</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
|
||||
<para>
|
||||
<function>Memcache::setServerParams</function> changes server parameters at runtime.
|
||||
</para>
|
||||
|
||||
|
||||
<note>
|
||||
<para>
|
||||
This function has been added to Memcache version 2.1.0.
|
||||
@@ -43,70 +43,68 @@
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>host</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Point to the host where memcached is listening for connections.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>port</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Point to the port where memcached is listening for connections.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>timeout</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Value in seconds which will be used for connecting to the daemon. Think
|
||||
twice before changing the default value of 1 second - you can lose all
|
||||
the advantages of caching if your connection is too slow.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>retry_interval</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls how often a failed server will be retried, the default value
|
||||
is 15 seconds. Setting this parameter to -1 disables automatic retry.
|
||||
Neither this nor the <parameter>persistent</parameter> parameter has any
|
||||
effect when the extension is loaded dynamically via <function>dl</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>status</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls if the server should be flagged as online. Setting this parameter
|
||||
to &false; and <parameter>retry_interval</parameter> to -1 allows a failed
|
||||
server to be kept in the pool so as not to affect the key distribution
|
||||
algorithm. Requests for this server will then failover or fail immediately
|
||||
depending on the <parameter>memcache.allow_failover</parameter> setting.
|
||||
Default to &true;, meaning the server should be considered online.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>failure_callback</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Allows the user to specify a callback function to run upon encountering an
|
||||
error. The callback is run before failover is attempted. The function takes
|
||||
two parameters, the hostname and port of the failed server.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>host</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Point to the host where memcached is listening for connections.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>port</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Point to the port where memcached is listening for connections.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>timeout</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Value in seconds which will be used for connecting to the daemon. Think
|
||||
twice before changing the default value of 1 second - you can lose all
|
||||
the advantages of caching if your connection is too slow.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>retry_interval</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls how often a failed server will be retried, the default value
|
||||
is 15 seconds. Setting this parameter to -1 disables automatic retry.
|
||||
Neither this nor the <parameter>persistent</parameter> parameter has any
|
||||
effect when the extension is loaded dynamically via <function>dl</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>status</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls if the server should be flagged as online. Setting this parameter
|
||||
to &false; and <parameter>retry_interval</parameter> to -1 allows a failed
|
||||
server to be kept in the pool so as not to affect the key distribution
|
||||
algorithm. Requests for this server will then failover or fail immediately
|
||||
depending on the <parameter>memcache.allow_failover</parameter> setting.
|
||||
Default to &true;, meaning the server should be considered online.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>failure_callback</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Allows the user to specify a callback function to run upon encountering an
|
||||
error. The callback is run before failover is attempted. The function takes
|
||||
two parameters, the hostname and port of the failed server.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
@@ -118,10 +116,9 @@
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>Memcache::setServerParams</function> example</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title><function>Memcache::setServerParams</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -146,23 +143,19 @@ memcache_set_server_params($memcache_obj, 'memcache_host', 11211, 1, 15, true, '
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::addServer</function></member>
|
||||
<member><function>Memcache::getServerStatus</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<simplelist>
|
||||
<member><function>Memcache::addServer</function></member>
|
||||
<member><function>Memcache::getServerStatus</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
Reference in New Issue
Block a user