mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Tell people to not use the timeout parameter. Difficult to determine specifics as to when this worked/works.... but people probably shouldn't use it. Brian Moon found this topic.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@306521 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
58b6214d57
commit
ce6c9f2b53
1 changed files with 33 additions and 12 deletions
|
@ -11,15 +11,11 @@
|
|||
<methodsynopsis>
|
||||
<type>bool</type><methodname>Memcache::delete</methodname>
|
||||
<methodparam><type>string</type><parameter>key</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>timeout</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>timeout</parameter><initializer>0</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<function>Memcache::delete</function> deletes item with the
|
||||
<parameter>key</parameter>. If parameter <parameter>timeout</parameter>
|
||||
is specified, the item will expire after
|
||||
<parameter>timeout</parameter> seconds.
|
||||
Also you can use <function>memcache_delete</function> function.
|
||||
<function>Memcache::delete</function> deletes an item with the <parameter>key</parameter>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
@ -40,9 +36,8 @@
|
|||
<term><parameter>timeout</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Execution time of the item. If it's equal to zero, the item will be
|
||||
deleted right away whereas if you set it to 30, the item will be
|
||||
deleted in 30 seconds.
|
||||
This deprecated parameter is not supported, and defaults to <literal>0</literal> seconds.
|
||||
Do not use this parameter.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -50,6 +45,32 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>Unknown</entry>
|
||||
<entry>
|
||||
<!-- @todo I don't understand this topic; it could be documented better -->
|
||||
It's not recommended to use the <parameter>timeout</parameter> parameter. The
|
||||
behavior differs between memcached versions, but setting to <literal>0</literal>
|
||||
is safe. Other values for this deprecated feature may cause the memcache delete
|
||||
to fail.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
@ -69,14 +90,14 @@
|
|||
/* procedural API */
|
||||
$memcache_obj = memcache_connect('memcache_host', 11211);
|
||||
|
||||
/* after 10 seconds item will be deleted by the server */
|
||||
memcache_delete($memcache_obj, 'key_to_delete', 10);
|
||||
/* item will be deleted by the server */
|
||||
memcache_delete($memcache_obj, 'key_to_delete');
|
||||
|
||||
/* OO API */
|
||||
$memcache_obj = new Memcache;
|
||||
$memcache_obj->connect('memcache_host', 11211);
|
||||
|
||||
$memcache_obj->delete('key_to_delete', 10);
|
||||
$memcache_obj->delete('key_to_delete');
|
||||
|
||||
?>
|
||||
]]>
|
||||
|
|
Loading…
Reference in a new issue