相關(guān)關(guān)鍵詞
關(guān)于我們
最新文章
YII框架中使用memcache的方法詳解
本文實例講述了YII框架中使用memcache的方法。分享給大家供大家參考,具體如下:
yii中可以很方便的使用memcache
一.配置
在main.php的components中加入cache配置
array( 'components'=>array( 'cache'=>array( 'class'=>'CMemCache', 'servers'=>array( array( 'host'=>'server1', 'port'=>11211, 'weight'=>60, ), array( 'host'=>'server2', 'port'=>11211, 'weight'=>40, ), ), ), ), )