1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-24 15:52:15 +01:00

Add missing constants and function for Memcached (#3873)

And do various drive-by improvements
This commit is contained in:
cracksalad
2024-11-10 18:45:28 +01:00
committed by GitHub
parent 92e188ab73
commit 7e6d80ad17
4 changed files with 525 additions and 92 deletions

View File

@@ -9,26 +9,90 @@
<varlistentry xml:id="memcached.constants.opt-compression">
<term><constant>Memcached::OPT_COMPRESSION</constant></term>
<listitem>
<para>Enables or disables payload compression. When enabled,
item values longer than a certain threshold (currently 100 bytes) will be
<simpara>
Enables or disables payload compression. When enabled,
item values longer than a certain threshold (currently 2000 bytes) will be
compressed during storage and decompressed during retrieval
transparently.</para>
<para>Type: &boolean;, default: &true;.</para>
transparently. The threshold can be configured using the
<link linkend="ini.memcached.compression-threshold">memcached.compression_threshold</link>
ini setting.
</simpara>
<para>Type: <type>bool</type>, default: &true;.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-compression-type">
<term><constant>Memcached::OPT_COMPRESSION_TYPE</constant></term>
<listitem>
<simpara>
Specifies the compression algorithm to use, if compression is enabled.
The valid algorithms are <constant>Memcached::COMPRESSION_FASTLZ</constant>,
<constant>Memcached::COMPRESSION_ZLIB</constant> and
<constant>Memcached::COMPRESSION_ZSTD</constant>.
</simpara>
<para>Type: <type>int</type>, default: <constant>Memcached::COMPRESSION_FASTLZ</constant>.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.compression-fastlz">
<term><constant>Memcached::COMPRESSION_FASTLZ</constant></term>
<listitem>
<simpara>
The FASTLZ compression algorithm.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.compression-zlib">
<term><constant>Memcached::COMPRESSION_ZLIB</constant></term>
<listitem>
<simpara>The ZLIB compression algorithm.</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.compression-zstd">
<term><constant>Memcached::COMPRESSION_ZSTD</constant></term>
<listitem>
<simpara>
The ZSTD compression algorithm.
</simpara>
<simpara>
Available as of Memcached 3.3.0.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-compression-level">
<term><constant>Memcached::OPT_COMPRESSION_LEVEL</constant></term>
<listitem>
<simpara>
Specifies the compression level to use, if compression is enabled.
</simpara>
<simplelist>
<member><constant>Memcached::COMPRESSION_FASTLZ</constant> does not support compression levels.</member>
<member><constant>Memcached::COMPRESSION_ZSTD</constant>: minimum level is <literal>-22</literal> and maximum level is <literal>22</literal>.</member>
<member><constant>Memcached::COMPRESSION_ZLIB</constant>: minimum level is <literal>0</literal> and maximum level is <literal>9</literal>.</member>
</simplelist>
<para>Type: <type>int</type>, default: <literal>3</literal>.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-serializer">
<term><constant>Memcached::OPT_SERIALIZER</constant></term>
<listitem>
<para>
<simpara>
Specifies the serializer to use for serializing non-scalar values.
The valid serializers are <constant>Memcached::SERIALIZER_PHP</constant>
or <constant>Memcached::SERIALIZER_IGBINARY</constant>. The latter is
supported only when memcached is configured with
<literal>--enable-memcached-igbinary</literal> option and the
<literal>igbinary</literal> extension is loaded.
The valid serializers are <constant>Memcached::SERIALIZER_PHP</constant>,
<constant>Memcached::SERIALIZER_IGBINARY</constant>,
<constant>Memcached::SERIALIZER_JSON</constant>,
<constant>Memcached::SERIALIZER_JSON_ARRAY</constant> and
<constant>Memcached::SERIALIZER_MSGPACK</constant>.
</simpara>
<para>
Type: <type>int</type>, default: <constant>Memcached::SERIALIZER_IGBINARY</constant> if available,
then <constant>Memcached::SERIALIZER_MSGPACK</constant> if available,
then <constant>Memcached::SERIALIZER_PHP</constant>.
</para>
<para>Type: &integer;, default: <constant>Memcached::SERIALIZER_PHP</constant>.</para>
</listitem>
</varlistentry>
@@ -42,39 +106,74 @@
<varlistentry xml:id="memcached.constants.serializer-igbinary">
<term><constant>Memcached::SERIALIZER_IGBINARY</constant></term>
<listitem>
<para>The <link xlink:href="&url.igbinary;">igbinary</link> serializer.
<simpara>
The <link linkend="book.igbinary">igbinary</link> serializer.
Instead of textual representation it stores PHP data structures in a
compact binary form, resulting in space and time gains.</para>
compact binary form, resulting in space and time gains.
</simpara>
<simpara>
This serializer is supported only if memcached is configured with
<option>--enable-memcached-igbinary</option> option and the
<link linkend="intro.igbinary">igbinary</link> extension is loaded.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.serializer-json">
<term><constant>Memcached::SERIALIZER_JSON</constant></term>
<listitem>
<para>The JSON serializer.</para>
<para>The JSON serializer. This serializer deserializes JSON to an object.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.serializer-json-array">
<term><constant>Memcached::SERIALIZER_JSON_ARRAY</constant></term>
<listitem>
<simpara>
The JSON array serializer.
This serializer deserializes JSON to an associative array
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.serializer-msgpack">
<term><constant>Memcached::SERIALIZER_MSGPACK</constant></term>
<listitem>
<simpara>
The <link xlink:href="&url.pecl.package;msgpack">MessagePack</link> serializer.
</simpara>
<simpara>
This serializer is supported only if memcached is configured with
<option>--enable-memcached-msgpack</option> option and the
<literal>msgpack</literal> extension is loaded.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-prefix-key">
<term><constant>Memcached::OPT_PREFIX_KEY</constant></term>
<listitem>
<para>This can be used to create a "domain" for your item keys. The value
<simpara>
This can be used to create a "domain" for your item keys. The value
specified here will be prefixed to each of the keys. It cannot be
longer than <literal>128</literal> characters and will reduce the
maximum available key size. The prefix is applied only to the item keys,
not to the server keys.</para>
<para>Type: &string;, default: <literal>""</literal>.</para>
not to the server keys.
</simpara>
<para>Type: <type>string</type>, default: <literal>""</literal>.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-hash">
<term><constant>Memcached::OPT_HASH</constant></term>
<listitem>
<para>Specifies the hashing algorithm used for the item keys. The valid
<simpara>
Specifies the hashing algorithm used for the item keys. The valid
values are supplied via <constant>Memcached::HASH_<replaceable>*</replaceable></constant> constants.
Each hash algorithm has its advantages and its disadvantages. Go with the
default if you don't know or don't care.</para>
<para>Type: &integer;, default: <constant>Memcached::HASH_DEFAULT</constant></para>
default if you don't know or don't care.
</simpara>
<para>Type: <type>int</type>, default: <constant>Memcached::HASH_DEFAULT</constant></para>
</listitem>
</varlistentry>
@@ -144,11 +243,13 @@
<varlistentry xml:id="memcached.constants.opt-distribution">
<term><constant>Memcached::OPT_DISTRIBUTION</constant></term>
<listitem>
<para>Specifies the method of distributing item keys to the servers.
<simpara>
Specifies the method of distributing item keys to the servers.
Currently supported methods are modulo and consistent hashing. Consistent
hashing delivers better distribution and allows servers to be added to
the cluster with minimal cache losses.</para>
<para>Type: &integer;, default: <constant>Memcached::DISTRIBUTION_MODULA.</constant></para>
the cluster with minimal cache losses.
</simpara>
<para>Type: <type>int</type>, default: <constant>Memcached::DISTRIBUTION_MODULA</constant>.</para>
</listitem>
</varlistentry>
@@ -166,10 +267,20 @@
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.distribution-virtual-bucket">
<term><constant>Memcached::DISTRIBUTION_VIRTUAL_BUCKET</constant></term>
<listitem>
<simpara>
Virtual Bucket hashing key distribution algorithm (also called vbucket).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-libketama-compatible">
<term><constant>Memcached::OPT_LIBKETAMA_COMPATIBLE</constant></term>
<listitem>
<para>Enables or disables compatibility with libketama-like behavior. When
<para>
Enables or disables compatibility with libketama-like behavior. When
enabled, the item key hashing algorithm is set to MD5 and distribution is
set to be weighted consistent hashing distribution. This is useful
because other libketama-based clients (Python, Ruby, etc.) with the same
@@ -178,177 +289,332 @@
<note>
<para>
It is highly recommended to enable this option if you want to use
consistent hashing, and it may be enabled by default in future
releases.
consistent hashing, and it may be enabled by default in future
releases.
</para>
</note>
<para>Type: &boolean;, default: &false;.</para>
<para>Type: <type>bool</type>, default: &false;.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-libketama-hash">
<term><constant>Memcached::OPT_LIBKETAMA_HASH</constant></term>
<listitem>
<simpara>
Specifies the hashing algorithm for host mapping.
</simpara>
<para>Type: <type>int</type>.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-tcp-keepalive">
<term><constant>Memcached::OPT_TCP_KEEPALIVE</constant></term>
<listitem>
<simpara>
Enables TCP keep alive.
</simpara>
<para>Type: <type>bool</type>, default: &false;.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-buffer-writes">
<term><constant>Memcached::OPT_BUFFER_WRITES</constant></term>
<listitem>
<para>Enables or disables buffered I/O. Enabling buffered I/O causes
<simpara>
Enables or disables buffered I/O. Enabling buffered I/O causes
storage commands to "buffer" instead of being sent. Any action that
retrieves data causes this buffer to be sent to the remote connection.
Quitting the connection or closing down the connection will also cause
the buffered data to be pushed to the remote connection.</para>
<para>Type: &boolean;, default: &false;.</para>
the buffered data to be pushed to the remote connection.
</simpara>
<para>Type: <type>bool</type>, default: &false;.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-binary-protocol">
<term><constant>Memcached::OPT_BINARY_PROTOCOL</constant></term>
<listitem>
<para>Enable the use of the binary protocol. Please note that you cannot
toggle this option on an open connection.</para>
<para>Type: &boolean;, default: &false;.</para>
<simpara>
Enable the use of the binary protocol. Please note that you cannot
toggle this option on an open connection.
</simpara>
<para>Type: <type>bool</type>, default: &false;.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-no-block">
<term><constant>Memcached::OPT_NO_BLOCK</constant></term>
<listitem>
<para>Enables or disables asynchronous I/O. This is the fastest transport
available for storage functions.</para>
<para>Type: &boolean;, default: &false;.</para>
<simpara>
Enables or disables asynchronous I/O. This is the fastest transport
available for storage functions.
</simpara>
<para>Type: <type>bool</type>, default: &false;.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-noreply">
<term><constant>Memcached::OPT_NOREPLY</constant></term>
<listitem>
<para>
Enables or disables ignoring the result of storage commands
(set, add, replace, append, prepend, delete, increment, decrement, etc.).
Storage commands will be sent without spending time waiting for a reply
<simpara>
Enables or disables ignoring the result of storage commands
(set, add, replace, append, prepend, delete, increment, decrement, etc.).
Storage commands will be sent without spending time waiting for a reply
(there would be no reply).
Retrieval commands such as <function>Memcached::get</function> are unaffected by this setting.</para>
<para>Type: &boolean;, default: &false;.</para>
Retrieval commands such as <methodname>Memcached::get</methodname> are unaffected by this setting.
</simpara>
<para>Type: <type>bool</type>, default: &false;.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-tcp-nodelay">
<term><constant>Memcached::OPT_TCP_NODELAY</constant></term>
<listitem>
<para>Enables or disables the no-delay feature for connecting sockets (may
be faster in some environments).</para>
<para>Type: &boolean;, default: &false;.</para>
<simpara>
Enables or disables the no-delay feature for connecting sockets (may
be faster in some environments).
</simpara>
<para>Type: <type>bool</type>, default: &false;.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-socket-send-size">
<term><constant>Memcached::OPT_SOCKET_SEND_SIZE</constant></term>
<listitem>
<para>The maximum socket send buffer in bytes.</para>
<para>Type: &integer;, default: varies by platform/kernel
configuration.</para>
<simpara>The maximum socket send buffer in bytes.</simpara>
<para>
Type: <type>int</type>, default: varies by platform/kernel
configuration.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-socket-recv-size">
<term><constant>Memcached::OPT_SOCKET_RECV_SIZE</constant></term>
<listitem>
<para>The maximum socket receive buffer in bytes.</para>
<para>Type: &integer;, default: varies by platform/kernel
configuration.</para>
<simpara>The maximum socket receive buffer in bytes.</simpara>
<para>
Type: <type>int</type>, default: varies by platform/kernel
configuration.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-connect-timeout">
<term><constant>Memcached::OPT_CONNECT_TIMEOUT</constant></term>
<listitem>
<para>In non-blocking mode this set the value of the timeout during socket
connection, in milliseconds.</para>
<para>Type: &integer;, default: <literal>1000</literal>.</para>
<simpara>
In non-blocking mode this set the value of the timeout during socket
connection, in milliseconds.
</simpara>
<para>Type: <type>int</type>, default: <literal>1000</literal>.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-retry-timeout">
<term><constant>Memcached::OPT_RETRY_TIMEOUT</constant></term>
<listitem>
<para>The amount of time, in seconds, to wait until retrying a failed
connection attempt.</para>
<para>Type: &integer;, default: <literal>0</literal>.</para>
<simpara>
The amount of time, in seconds, to wait until retrying a failed
connection attempt.
</simpara>
<para>Type: <type>int</type>, default: <literal>2</literal>.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-dead-timeout">
<term><constant>Memcached::OPT_DEAD_TIMEOUT</constant></term>
<listitem>
<simpara>
The amount of time, in seconds, to wait until retrying dead servers.
<literal>0</literal> means no retry.
</simpara>
<para>Type: <type>int</type>, default: <literal>0</literal>.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-send-timeout">
<term><constant>Memcached::OPT_SEND_TIMEOUT</constant></term>
<listitem>
<para>Socket sending timeout, in microseconds. In cases where you cannot
<simpara>
Socket sending timeout, in microseconds. In cases where you cannot
use non-blocking I/O this will allow you to still have timeouts on the
sending of data.</para>
<para>Type: &integer;, default: <literal>0</literal>.</para>
sending of data.
</simpara>
<para>Type: <type>int</type>, default: <literal>0</literal>.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-recv-timeout">
<term><constant>Memcached::OPT_RECV_TIMEOUT</constant></term>
<listitem>
<para>Socket reading timeout, in microseconds. In cases where you cannot
<simpara>
Socket reading timeout, in microseconds. In cases where you cannot
use non-blocking I/O this will allow you to still have timeouts on the
reading of data.</para>
<para>Type: &integer;, default: <literal>0</literal>.</para>
reading of data.
</simpara>
<para>Type: <type>int</type>, default: <literal>0</literal>.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-poll-timeout">
<term><constant>Memcached::OPT_POLL_TIMEOUT</constant></term>
<listitem>
<para>Timeout for connection polling, in milliseconds.</para>
<para>Type: &integer;, default: <literal>1000</literal>.</para>
<simpara>Timeout for connection polling, in milliseconds.</simpara>
<para>Type: <type>int</type>, default: <literal>1000</literal>.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-cache-lookups">
<term><constant>Memcached::OPT_CACHE_LOOKUPS</constant></term>
<listitem>
<para>Enables or disables caching of DNS lookups.</para>
<para>Type: &boolean;, default: &false;.</para>
<simpara>Enables or disables caching of DNS lookups.</simpara>
<para>Type: <type>bool</type>, default: &false;.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-server-failure-limit">
<term><constant>Memcached::OPT_SERVER_FAILURE_LIMIT</constant></term>
<listitem>
<para>Specifies the failure limit for server connection attempts. The
server will be removed after this many continuous connection
failures.</para>
<para>Type: &integer;, default: <literal>0</literal>.</para>
<simpara>
Specifies the failure limit for server connection attempts.
The server will be removed after this many continuous connection failures.
</simpara>
<para>Type: <type>int</type>, default: <literal>5</literal>.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-server-timeout-limit">
<term><constant>Memcached::OPT_SERVER_TIMEOUT_LIMIT</constant></term>
<listitem>
<simpara>
Specifies the timeout limit for server connection attempts.
The server will be removed after this many continuous connection timeouts.
</simpara>
<para>Type: <type>int</type>, default: <literal>0</literal>.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-auto-eject-hosts">
<term><constant>Memcached::OPT_AUTO_EJECT_HOSTS</constant></term>
<listitem>
<para>
Removes disabled servers from the list. Use together with
<constant>Memcached::OPT_SERVER_FAILURE_LIMIT</constant> and
<constant>Memcached::OPT_SERVER_TIMEOUT_LIMIT</constant>.
</para>
<note>
<para>
This option is replaced by
<constant>Memcached::OPT_REMOVE_FAILED_SERVERS</constant>.
</para>
</note>
<para>Type: <type>bool</type>, default: &false;.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-verify-key">
<term><constant>Memcached::OPT_VERIFY_KEY</constant></term>
<listitem>
<simpara>
Enables verification of keys by memcached.
</simpara>
<para>Type: <type>bool</type>, default: &false;.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-use-udp">
<term><constant>Memcached::OPT_USE_UDP</constant></term>
<listitem>
<simpara>
Uses UDP instead of TCP.
</simpara>
<para>Type: <type>bool</type>, default: &false;.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-number-of-replicas">
<term><constant>Memcached::OPT_NUMBER_OF_REPLICAS</constant></term>
<listitem>
<simpara>
Stores this many replicas of each item on different servers.
</simpara>
<para>Type: <type>int</type>, default: <literal>0</literal>.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-randomize-replica-reads">
<term><constant>Memcached::OPT_RANDOMIZE_REPLICA_READS</constant></term>
<listitem>
<simpara>
Randomizes replica read server.
</simpara>
<para>Type: <type>bool</type>, default: &false;.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.opt-remove-failed-servers">
<term><constant>Memcached::OPT_REMOVE_FAILED_SERVERS</constant></term>
<listitem>
<simpara>
Removes disabled servers from the list. Use together with
<constant>Memcached::OPT_SERVER_FAILURE_LIMIT</constant> and
<constant>Memcached::OPT_SERVER_TIMEOUT_LIMIT</constant>.
</simpara>
<para>Type: <type>bool</type>, default: &false;.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.have-igbinary">
<term><constant>Memcached::HAVE_IGBINARY</constant></term>
<listitem>
<para>Indicates whether igbinary serializer support is available.</para>
<para>Type: &boolean;.</para>
<simpara>Indicates whether igbinary serializer support is available.</simpara>
<para>Type: <type>bool</type>.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.have-json">
<term><constant>Memcached::HAVE_JSON</constant></term>
<listitem>
<para>Indicates whether JSON serializer support is available.</para>
<para>Type: &boolean;.</para>
<simpara>Indicates whether JSON serializer support is available.</simpara>
<para>Type: <type>bool</type>.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.have-msgpack">
<term><constant>Memcached::HAVE_MSGPACK</constant></term>
<listitem>
<para>Indicates whether msgpack serializer support is available.</para>
<para>Type: &boolean;.</para>
<simpara>Indicates whether MessagePack serializer support is available.</simpara>
<para>Type: <type>bool</type>.</para>
<para>Available as of Memcached 3.0.0.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.have-zstd">
<term><constant>Memcached::HAVE_ZSTD</constant></term>
<listitem>
<simpara>Indicates whether ZSTD compression support is available.</simpara>
<para>Type: <type>bool</type>.</para>
<para>Available as of Memcached 3.3.0.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.have-encoding">
<term><constant>Memcached::HAVE_ENCODING</constant></term>
<listitem>
<simpara>
Indicates whether data encryption using
<methodname>Memcached::setEncodingKey</methodname> is supported.
</simpara>
<para>Type: <type>bool</type>.</para>
<para>Available as of Memcached 3.1.0.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.have-session">
<term><constant>Memcached::HAVE_SESSION</constant></term>
<listitem>
<para>Type: &boolean;.</para>
<para>Type: <type>bool</type>.</para>
<para>Available as of Memcached 3.0.0.</para>
</listitem>
</varlistentry>
@@ -356,7 +622,7 @@
<varlistentry xml:id="memcached.constants.have-sasl">
<term><constant>Memcached::HAVE_SASL</constant></term>
<listitem>
<para>Type: &boolean;.</para>
<para>Type: <type>bool</type>.</para>
<para>Available as of Memcached 3.0.0.</para>
</listitem>
</varlistentry>
@@ -364,9 +630,11 @@
<varlistentry xml:id="memcached.constants.get-extended">
<term><constant>Memcached::GET_EXTENDED</constant></term>
<listitem>
<para>A flag for <function>Memcached::get</function>, <function>Memcached::getMulti</function> and
<function>Memcached::getMultiByKey</function> to ensure that the CAS token values
are returned as well.</para>
<para>
A flag for <methodname>Memcached::get</methodname>, <methodname>Memcached::getMulti</methodname> and
<methodname>Memcached::getMultiByKey</methodname> to ensure that the CAS token values
are returned as well.
</para>
<para>Available as of Memcached 3.0.0.</para>
</listitem>
</varlistentry>
@@ -374,10 +642,12 @@
<varlistentry xml:id="memcached.constants.get-preserve-order">
<term><constant>Memcached::GET_PRESERVE_ORDER</constant></term>
<listitem>
<para>A flag for <function>Memcached::getMulti</function> and
<function>Memcached::getMultiByKey</function> to ensure that the keys are
<para>
A flag for <methodname>Memcached::getMulti</methodname> and
<methodname>Memcached::getMultiByKey</methodname> to ensure that the keys are
returned in the same order as they were requested in. Non-existing keys
get a default value of NULL.</para>
get a default value of &null;.
</para>
</listitem>
</varlistentry>
@@ -448,17 +718,21 @@
<varlistentry xml:id="memcached.constants.res-notstored">
<term><constant>Memcached::RES_NOTSTORED</constant></term>
<listitem>
<para>Item was not stored: but not because of an error. This normally
<para>
Item was not stored: but not because of an error. This normally
means that either the condition for an "add" or a "replace" command
wasn't met, or that the item is in a delete queue.</para>
wasn't met, or that the item is in a delete queue.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.res-notfound">
<term><constant>Memcached::RES_NOTFOUND</constant></term>
<listitem>
<para>Item with this key was not found (with "get" operation or "cas"
operations).</para>
<para>
Item with this key was not found (with "get" operation or "cas"
operations).
</para>
</listitem>
</varlistentry>
@@ -518,6 +792,76 @@
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.res-stored">
<term><constant>Memcached::RES_STORED</constant></term>
<listitem>
<simpara>Item stored.</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.res-deleted">
<term><constant>Memcached::RES_DELETED</constant></term>
<listitem>
<simpara>Item deleted.</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.res-stat">
<term><constant>Memcached::RES_STAT</constant></term>
<listitem>
<simpara>Statistics.</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.res-item">
<term><constant>Memcached::RES_ITEM</constant></term>
<listitem>
<simpara>Item.</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.res-not-supported">
<term><constant>Memcached::RES_NOT_SUPPORTED</constant></term>
<listitem>
<simpara>Not supported.</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.res-fetch-notfinished">
<term><constant>Memcached::RES_FETCH_NOTFINISHED</constant></term>
<listitem>
<simpara>Fetch not finished.</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.res-server-marked-dead">
<term><constant>Memcached::RES_SERVER_MARKED_DEAD</constant></term>
<listitem>
<simpara>Server marked dead.</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.res-unknown-stat-key">
<term><constant>Memcached::RES_BAD_KEY_PROVIDED</constant></term>
<listitem>
<simpara>Unknown stat key.</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.res-invalid-host-protocol">
<term><constant>Memcached::RES_INVALID_HOST_PROTOCOL</constant></term>
<listitem>
<simpara>Invalid host protocol.</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.res-memory-allocation-failure">
<term><constant>Memcached::RES_MEMORY_ALLOCATION_FAILURE</constant></term>
<listitem>
<simpara>Memory allocation failure.</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="memcached.constants.res-connection-socket-create-failure">
<term><constant>Memcached::RES_CONNECTION_SOCKET_CREATE_FAILURE</constant></term>
<listitem>

View File

@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="memcached.setencodingkey" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Memcached::setEncodingKey</refname>
<refpurpose>Set AES encryption key for data in Memcached</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="Memcached">
<modifier>public</modifier> <type>bool</type><methodname>Memcached::setEncodingKey</methodname>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
</methodsynopsis>
<simpara>
This method sets the AES encryption/decryption key for data written to and read from Memcached.
</simpara>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>key</parameter></term>
<listitem>
<simpara>
The AES key.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<simpara>
&return.success;
</simpara>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><methodname>Memcached::get</methodname></member>
<member><methodname>Memcached::add</methodname></member>
<member><methodname>Memcached::set</methodname></member>
</simplelist>
</refsect1>
</refentry>
<!-- 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
-->

View File

@@ -28,7 +28,7 @@
<term><parameter>option</parameter></term>
<listitem>
<para>
One of the <literal>Memcached::OPT_*</literal> constant.
One of the <constant>Memcached::OPT_<replaceable>*</replaceable></constant> constant.
See <link linkend="memcached.constants">Memcached Constants</link> for more information.
</para>
</listitem>
@@ -43,8 +43,26 @@
<para>
The options listed below require values specified via constants.
<simplelist>
<member><literal>Memcached::OPT_HASH</literal> requires <literal>Memcached::HASH_*</literal> values.</member>
<member><literal>Memcached::OPT_DISTRIBUTION</literal> requires <literal>Memcached::DISTRIBUTION_*</literal> values.</member>
<member>
<constant>Memcached::OPT_HASH</constant> requires
<constant>Memcached::HASH_<replaceable>*</replaceable></constant>
values.
</member>
<member>
<constant>Memcached::OPT_DISTRIBUTION</constant> requires
<constant>Memcached::DISTRIBUTION_<replaceable>*</replaceable></constant>
values.
</member>
<member>
<constant>Memcached::OPT_SERIALIZER</constant> requires
<constant>Memcached::SERIALIZER_<replaceable>*</replaceable></constant>
values.
</member>
<member>
<constant>Memcached::OPT_COMPRESSION_TYPE</constant> requires
<constant>Memcached::COMPRESSION_<replaceable>*</replaceable></constant>
values.
</member>
</simplelist>
</para>
</note>

View File

@@ -50,6 +50,7 @@
<function name='memcached::resetServerList' from='PECL memcached &gt;= 2.0.0'/>
<function name='memcached::set' from='PECL memcached &gt;= 0.1.0'/>
<function name='memcached::setByKey' from='PECL memcached &gt;= 0.1.0'/>
<function name='memcached::setEncodingKey' from='PECL memcached &gt;= 3.1.0'/>
<function name='memcached::setMulti' from='PECL memcached &gt;= 0.1.0'/>
<function name='memcached::setMultiByKey' from='PECL memcached &gt;= 0.1.0'/>
<function name='memcached::setOption' from='PECL memcached &gt;= 0.1.0'/>