我试图让 Zend_Cache 与两个不同的 memcached 实例一起工作。两个实例都处于活动状态并且正在侦听,我对此进行了测试,但 Zend_Cache 继续将所有内容塞入 memcached 的默认端口中,完全无视第二个实例。这是我的引导程序中的代码:
$backend = array(
'name' => 'Memcached',
'servers' => array( array(
'host' => '127.0.0.1',
'port' => '11211'
) ),
'compression' => true
);
$backend_system = array(
'name' => 'Memcached',
'servers' => array( array(
'host' => '127.0.0.1',
'port' => '11212'
) ),
'compression' => true
);
$systemCache = array(
'frontend' => array(
'name' => 'Core',
'options' => array(
'lifetime' => 7*24*60*60,
'automatic_serialization' => true
)
),
'backend' => $backend_system
);
$dataCache = array(
'frontend' => array(
'name' => 'Core',
'options' => array(
'lifetime' => 1*60*60,
'automatic_serialization' => true
)
),
'backend' => $backend
);
$manager = new Zend_Cache_Manager;
$manager->setCacheTemplate('system', $systemCache);
$manager->setCacheTemplate('data', $dataCache);
Zend_Registry::set( 'manager' , $manager );
这里出了什么问题?