PHP: Memcache::delete - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Memcache::flush Memcache::decrement

Last updated: Sat, 27 Jan 2007

view this page in

# Memcache::delete

(no version information, might be only in CVS)

Memcache::delete -- Delete item from the server

## Описание

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.

## Список параметров

`key`

`timeout`

## Возвращаемые значения

Возвращает `TRUE` в случае успешного завершения или `FALSE` в случае возникновения ошибки.

## Примеры

Пример 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);
?>`

## Смотрите также

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

add a note User Contributed Notes
Memcache::delete
There are no user contributed notes for this page.
Memcache::flush Memcache::decrement

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 09:32:46 2007 PST