Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Memcache::decrementMemcache::flush>
Last updated: Tue, 19 Sep 2006

Memcache::delete

(no version information, might be only in CVS)

Memcache::delete -- Delete item from the server

Description

bool Memcache::delete ( string key [, int timeout] )

Memcache::delete() deletes item with the key. If parameter timeout is specified, the item will expire after timeout seconds. Also you can use memcache_delete() function.

Parameters

key

timeout

Return Values

Returns TRUE on success or FALSE on failure.

Examples

Example 1. Memcache::delete() example

<?php

/* 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);

/* OO API */
$memcache_obj = new Memcache;
$memcache_obj->connect('memcache_host', 11211);

$memcache_obj->delete('key_to_delete', 10);

?>

See Also

Memcache::set()
Memcache::replace()




<Memcache::decrementMemcache::flush>
Last updated: Tue, 19 Sep 2006