多个Yii项目之间共享CMemCache
红色部分为重要留意部分!
// application components 'components'=>array( 'user'=>array( // enable cookie-based authentication 'allowAutoLogin'=>true, 'stateKeyPrefix' => 'KOPUSTATE', 'identityCookie'=>array('domain' => APPLICATION_COOKIE_DOMAIN,'path' => '/'), ), 'session'=>array( 'cookieParams' => array( 'path'=>'/', 'domain'=> APPLICATION_COOKIE_DOMAIN ), 'class'=> 'CCacheHttpSession', 'cacheID' => 'mcache', 'timeout' => 3600 ), 'mcache' => array( 'class' => 'system.caching.CMemCache', 'keyPrefix' => "KOPUMCACHE", 'servers' => array( array('host' => MEMCACHED_HOST, 'port' => MEMCACHED_PORT), ), ), )