PHP 8.5.0 Alpha 2 available for testing

Memcached::deleteByKey

(PECL memcached >= 0.1.0)

Memcached::deleteByKeyElimina un elemento de un servidor específico

Descripción

public Memcached::deleteByKey(string $server_key, string $key, int $time = 0): bool

Memcached::deleteByKey() es funcionalmente equivalente a Memcached::delete(), excepto por la variable libre server_key que puede ser utilizada para dirigir la variable key a un servidor específico.

Parámetros

server_key

The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.

key

La clave a eliminar.

time

La duración de espera para la eliminación.

Nota: As of memcached 1.3.0 (released 2009) this feature is no longer supported. Passing a non-zero time will cause the deletion to fail. Memcached::getResultCode() will return MEMCACHED_INVALID_ARGUMENTS.

Valores devueltos

Esta función retorna true en caso de éxito o false si ocurre un error. El método Memcached::getResultCode() devuelve Memcached::RES_NOTFOUND si la clave no existe.

Ver también

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top