位置: 编程技术 - 正文
推荐整理分享PHP:Memcached::setOptions()的用法_Memcached类,希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!
(PECL memcached >= 2.0.0)
Memcached::setOptions — Set Memcached options
说明 public bool Memcached::setOptions ( array $options )Memcached::setOptions() is a variation of the Memcached::setOption() that takes an array of options to be set.
参数optionsAn associative array of options where the key is the option to set and the value is the new value for the option.
返回值成功时返回 TRUE, 或者在失败时返回 FALSE。
范例
Example #1 Setting Memcached options
<?php$m=newMemcached();var_dump($m->getOption(Memcached::OPT_HASH)==Memcached::HASH_DEFAULT);$m->setOptions(array(Memcached::OPT_HASH=>Memcached::HASH_MURMUR,Memcached::OPT_PREFIX_KEY=>"widgets"));var_dump($m->getOption(Memcached::OPT_HASH)==Memcached::HASH_DEFAULT);echo"Prefixkeyisnow:",$m->getOption(Memcached::OPT_PREFIX_KEY),"n";?>以上例程会输出:
参见Memcached::getOption() - 获取Memcached的选项值 Memcached::setOption() - 设置一个memcached选项 Memcached Constants
PHP:Memcached::setByKey()的用法_Memcached类 Memcached::setByKey(PECLmemcached=0.1.0)Memcached::setByKeyStoreanitemonaspecificserver说明publicboolMemcached::setByKey(string$server_key,string$key,mixed$value[,int$expiration])除了可以使用s
PHP:Memcached::setMultiByKey()的用法_Memcached类 Memcached::setMultiByKey(PECLmemcached=0.1.0)Memcached::setMultiByKeyStoremultipleitemsonaspecificserver说明publicboolMemcached::setMultiByKey(string$server_key,array$items[,int$expiration])除了
PHP:Memcached::resetServerList()的用法_Memcached类 Memcached::resetServerList(PECLmemcached=2.0.0)Memcached::resetServerListClearsallserversfromtheserverlist说明publicboolMemcached::resetServerList(void)Memcached::resetserverlist()removesallmemcache
标签: PHP:Memcached::setOptions()的用法_Memcached类
本文链接地址:https://www.jiuchutong.com/biancheng/280084.html 转载请保留说明!上一篇:PHP:Memcached::setSaslAuthData()的用法_Memcached类
下一篇:PHP:Memcached::setByKey()的用法_Memcached类
友情链接: 武汉网站建设