magento 启用xcache

国内的xcache在PHP加速上一直很不错,至于怎么不错,那就只能自己体验了。。

在蜗牛般的magento上,我也尝试着用下xcache:

 

在app/etc/local.xml里完成配置后:

<global>

………………………………………..

<cache>
<backend>xcache</backend>
<prefix>rocky_</prefix>
</cache>

………………………………………..

</global>

运行发现报错。。

“fast_backend must implement the Zend_Cache_Backend_ExtendedInterface interface”

好吧。。现在就只能看代码找原因了。。

得到的结果是,

app/code/core/Mage/Core/Model/Cache.php

在Mage_Core_Model_Cache类的_getBackendOptions方法内找到

case ‘xcache’:
if (extension_loaded(‘xcache’)) {
$enable2levels = true;
$backendType = ‘Xcache’;
}
break;

把$enable2levels = true;这行屏蔽。

 

运行发现错误解除。。

xcache也能正常运用了,当然核心文件最好别改了,自己写个模块重写吧。。

原创文章,作者:卧龙涤生,如若转载,请注明出处:https://www.chuang-ke.com/1604

(0)
上一篇 2015年1月31日 下午1:53
下一篇 2015年1月31日 下午2:41

相关推荐

回复 新用户089499

您的电子邮箱地址不会被公开。 必填项已用*标注

评论列表(12条)

创客交流群