downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Memcached::setSaslAuthData> <Memcached::setOption
[edit] Last updated: Fri, 17 May 2013

view this page in

Memcached::setOptions

(PECL memcached >= 2.0.0)

Memcached::setOptionsSet Memcached options

Beschreibung

public bool Memcached::setOptions ( array $options )

Memcached::setOptions() is a variation of the Memcached::setOption() that takes an array of options to be set.

Parameter-Liste

options

An associative array of options where the key is the option to set and the value is the new value for the option.

Rückgabewerte

Gibt bei Erfolg TRUE zurück. Im Fehlerfall wird FALSE zurückgegeben.

Beispiele

Beispiel #1 Setting Memcached options

<?php
$m 
= new Memcached();
var_dump($m->getOption(Memcached::OPT_HASH) == Memcached::HASH_DEFAULT);

$m->setOptions(array(Memcached::OPT_HASH => Memcached::HASH_MURMURMemcached::OPT_PREFIX_KEY => "widgets"));

var_dump($m->getOption(Memcached::OPT_HASH) == Memcached::HASH_DEFAULT);
echo 
"Prefix key is now: "$m->getOption(Memcached::OPT_PREFIX_KEY), "\n";
?>

Das oben gezeigte Beispiel erzeugt folgende Ausgabe:

bool(true)
bool(false)
Prefix key is now: widgets

Siehe auch



add a note add a note User Contributed Notes Memcached::setOptions - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites