PHP 8.3.4 Released!

Memcached::deleteByKey

(PECL memcached >= 0.1.0)

Memcached::deleteByKeyDelete an item from a specific server

Descrizione

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

Memcached::deleteByKey() is functionally equivalent to Memcached::delete(), except that the free-form server_key can be used to map the key to a specific server.

Elenco dei parametri

server_key

La chiave che identifica il server su cui salvare il valore. Invece di effettuare li'hashing sulla chiave dell'elemento, si effettua l'hashing della chiave del server al momento di decidere con quale server memcached comunicare. Questo permette di raggruppare gli elementi correlati ad un singolo server ottenendo maggiore efficienza nelle operazioni multiple.

key

The key to be deleted.

time

The amount of time the server will wait to delete the item.

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.

Valori restituiti

Restituisce true in caso di successo, false in caso di fallimento. The Memcached::getResultCode() will return Memcached::RES_NOTFOUND if the key does not exist.

Vedere anche:

add a note

User Contributed Notes

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