Memcached::delete
PHP function
Edit on GitHub ✎
(PECL memcached >= 0.1.0)
Delete an item
Description
Memcached::delete(string $key, int $time = 0): bool
Delete the key from the server.
Parameters
keyThe key to be deleted.
timeThe amount of time the server will wait to delete the item.
Delete-time
Return Values
Success The Memcached::getResultCode will return Memcached::RES_NOTFOUND if the key does not exist.
Examples
Memcached::delete() example
php
<?php
$m = new Memcached();
$m->addServer('localhost', 11211);
$m->delete('key1');
?>See Also
Memcached::deleteByKeyMemcached::deleteMulti