setByKey() docs.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@275073 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Andrei Zmievski 2009-02-03 00:32:49 +00:00
parent 61738245e7
commit 390b0a76f1

View file

@ -1,23 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<refentry xml:id="memcached.setbykey" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Memcached::setByKey</refname>
<refpurpose>The setByKey purpose</refpurpose>
<refpurpose>Store data for a key on a specific server</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Memcached::setByKey</methodname>
<modifier>public</modifier> <type>bool</type><methodname>Memcached::set</methodname>
<methodparam><type>string</type><parameter>server_key</parameter></methodparam>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
<methodparam><type>string</type><parameter>value</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>expiration</parameter></methodparam>
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>expiration</parameter></methodparam>
</methodsynopsis>
<para>
The method description goes here.
<function>Memcached::setByKey</function> is functionally equivalent to
<methodname>Memcached::set</methodname>, except that the free-form
<parameter>server_key</parameter> can be used to map the
<parameter>key</parameter> to a specific server. This is useful if you need
to keep a bunch of related keys on a certain server.
</para>
</refsect1>
@ -29,7 +33,7 @@
<term><parameter>server_key</parameter></term>
<listitem>
<para>
Description...
The key identifying the server to store the value on.
</para>
</listitem>
</varlistentry>
@ -37,7 +41,7 @@
<term><parameter>key</parameter></term>
<listitem>
<para>
Description...
The key under which to store the value.
</para>
</listitem>
</varlistentry>
@ -45,7 +49,7 @@
<term><parameter>value</parameter></term>
<listitem>
<para>
Description...
The value to store.
</para>
</listitem>
</varlistentry>
@ -53,7 +57,7 @@
<term><parameter>expiration</parameter></term>
<listitem>
<para>
Description...
The expiration time of the value, as a Unix timestamp.
</para>
</listitem>
</varlistentry>
@ -64,7 +68,8 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Description...
&return.success;
Use <methodname>Memcached::getResultCode</methodname> if necessary.
</para>
</refsect1>
@ -76,16 +81,15 @@
<programlisting role="php">
<![CDATA[
<?php
/* ... */
$m = new Memcached();
$m->addServer('localhost', 11211);
/* keep IP blocks on a certain server */
$m->setByKey('api-cache', 'block-ip:169.254.253.252', 1);
$m->setByKey('api-cache', 'block-ip:169.127.127.202', 1);
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
...
]]>
</screen>
</example>
</para>
</refsect1>
@ -94,7 +98,7 @@
&reftitle.seealso;
<para>
<simplelist>
<member><methodname>Classname::Method</methodname></member>
<member><methodname>Memcached::set</methodname></member>
</simplelist>
</para>
</refsect1>