时间:2021-07-01 10:21:17 帮助过:22人阅读
'memcache'=>array(
'class'=>'CMemCache',
'servers'=>array(
array(
'host'=>'127.0.0.1',
'port'=>11211,
'weight'=>60,
),
array(
'host'=>'127.0.0.1',
'port'=>11211,
'weight'=>40,
),
),
),
使用:
[html]
Yii::app()->memcache->get(id);
Yii::app()->memcache->set(id,value,time);
Yii::app()->memcache->get(id);
Yii::app()->memcache->set(id,value,time);
http://www.bkjia.com/PHPjc/477582.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/477582.htmlTechArticle开始-运行-输入cmd,命令行打开memcached.exe,所在文件夹,输入:memcached.exe -d install 安装 输入memcached.exe -d start 启动 打开yii配置文件:conf...