svn: /phpdoc/en/trunk/reference/memcache/memcache/ delete.xml
| From: | Philip Olson | Date: | Mon, 20 Dec 2010 20:57:00 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/memcache/memcache/ delete.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-7554@lists.php.net to get a copy of this message | ||
philip Mon, 20 Dec 2010 20:57:00 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=306521
Log:
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.
Changed paths:
U phpdoc/en/trunk/reference/memcache/memcache/delete.xml
Modified: phpdoc/en/trunk/reference/memcache/memcache/delete.xml
===================================================================
--- phpdoc/en/trunk/reference/memcache/memcache/delete.xml 2010-12-20 20:49:10 UTC (rev 306520)
+++ phpdoc/en/trunk/reference/memcache/memcache/delete.xml 2010-12-20 20:57:00 UTC (rev 306521)
@@ -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');
?>
]]>