Memcached::getMulti(PECL memcached >= 0.1.0) Memcached::getMulti — Retrieve multiple items ОписаниеMemcached::getMulti() is similar to Memcached::get(), but instead of a single key item, it retrieves multiple items the keys of which are specified in the keys array. If cas_tokens variable is provided, it is filled with the CAS token values for the found items.
The flags parameter can be used to specify additional options for Memcached::getMulti(). Currently, the only available option is Memcached::GET_PRESERVE_ORDER that ensures that the keys are returned in the same order as they were requested in. Список параметров
Возвращаемые значенияReturns the array of found items или FALSE в случае возникновения ошибки. Используйте при необходимости Memcached::getResultCode(). Примеры
Пример #1 Memcached::getMulti() example
<?phpРезультатом выполнения данного примера будет что-то подобное:
array(2) {
["key1"]=>
string(6) "value1"
["key3"]=>
string(6) "value3"
}
array(2) {
["key1"]=>
float(2360)
["key3"]=>
float(2362)
}
Пример #2 Memcached::GET_PRESERVE_ORDER example
<?phpРезультатом выполнения данного примера будет что-то подобное: foo foo-data bar bar-data baz baz-data lol lol-data kek kek-data zoo Смотрите также
|
||