Memcached::getByKey

(PECL memcached >= 0.1.0)

Memcached::getByKeyRetrieve an item from a specific server

Opis

public Memcached::getByKey ( string $server_key , string $key [, callable $cache_cb [, int $flags ]] ) : mixed

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

Parametry

server_key

Klucz identyfikujący serwer, na którym dane będą zapisywane lub z którego będą odczytywane. Zamiast stosowania funkcji skrótu na samym kluczu elementu, stosujemy ją na kluczu serwera decydując z którym serwerem memcached się łączyć. Pozwala to na grupowanie powiązanych ze sobą elementów na jednym serwerze pozwalając na zwiększenie wydajności przy wielokrotnych operacjach.

key

The key of the item to fetch.

cache_cb

Read-through caching callback or NULL

flags

Flags to control the returned result. When value of Memcached::GET_EXTENDED is given will return the CAS token.

Zwracane wartości

Returns the value stored in the cache or FALSE otherwise. The Memcached::getResultCode() will return Memcached::RES_NOTFOUND if the key does not exist.

Rejestr zmian

Wersja Opis
3.0.0 The &cas_token parameter was removed. Instead flags was added and when it is given the value of Memcached::GET_EXTENDED it will ensure the CAS token to be fetched.

Zobacz też:

add a note add a note

User Contributed Notes

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