downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  

<Memcache::decrementMemcache::flush>
Last updated: Thu, 26 Jun 2008

Memcache::delete

(PECL memcache:0.2-2.1.2)

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

The key associated with the item to delete.

timeout

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.

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

?>



add a noteadd a note User Contributed Notes
Delete item from the server
There are no user contributed notes for this page.




<Memcache::decrementMemcache::flush>
Last updated: Thu, 26 Jun 2008
show source | credits | sitemap | contact | advertising | mirror sites
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://phpbuilder.com/
Last updated: Tue Nov 1 20:20:59 2005 EST
Columns / Articles | Tips / Quickies | News | News Linking and RSS Feeds | Shared Code Library
Mail Archives | Support / Discussion Forums | Get Started! Links | Contribute! | Docs