CakeFest 2024: The Official CakePHP Conference

Memcached::appendByKey

(PECL memcached >= 0.1.0)

Memcached::appendByKeyAppend data to an existing item on a specific server

Descrizione

public Memcached::appendByKey(string $server_key, string $key, string $value): ?bool

Memcached::appendByKey() is functionally equivalent to Memcached::append(), 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

La chiave in cui salvare il valore.

value

The string to append.

Valori restituiti

Restituisce true in caso di successo, false in caso di fallimento. Returns null when compression is on.

Errori/Eccezioni

Returns null and raises an E_WARNING when compression is enabled.

Vedere anche:

add a note

User Contributed Notes

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