CDbHttpSession和CCacheHttpSession在子域名中共用sessions出现不同的结果,求解

目录结构

├─framework

├─website

└─user

两个站点

www.xxx.com 指向 website

user.xxx.com 指向 user

main.php中

'components' => array(


    'user' => array(


        'allowAutoLogin' => true,


        'identityCookie' => array('domain' => '.xxx.com'),


        'stateKeyPrefix' => 'xxx',


    ),


    'session' => array(


        'cookieParams' => array('domain' => '.xxx.com'),


        //'class' => 'system.web.CCacheHttpSession',


        //'cacheID' => 'cache',


        'class' => 'system.web.CDbHttpSession',


        'connectionID' => 'db',


    ),

如果使用CDbHttpSession连接mysql,www和user只要用户登录其中一个,其他另一个的就能共用sessions无须登录。

而换成CCacheHttpSession连接memcache,登录其中一个,另一个却不能自动登录。ps:不知道如何取得写到memcache中session的key。

求解