2011-03-03 59 views
2

我想配置使用Magento的memcache。Magento - 配置memcached

代码环顾四周,我看到local.xml.additional一些配置和我也看到了将高速缓存配置在local.xml中

这样的例子,我离开了local.xml.additional单独文件,我放在local.xml中

<cache> 
<slow_backend>File</slow_backend> 
<fast_backend>memcached</fast_backend> 
<fast_backend_options> 
    <servers> 
    <server> 
     <host>localhost</host> 
     <port>11211</port> 
     <persistent>1</persistent> 
    </server> 
    </servers> 
</fast_backend_options> 

<backend>memcached</backend> 
<memcached> 
    <servers> 
    <server> 
     <host>localhost</host> 
     <port>11211</port> 
     <persistent>1</persistent> 
    </server> 
    </servers> 
</memcached> 
</cache> 

以下但运行:

远程登录本地主机11211

刷新Magento页面时似乎没有显示任何内容。

我是否需要进一步的配置?

感谢

UPDATE:

运行:

的memcached -vv

并刷新页面,给了我下面的输出:

<29 new auto-negotiating client connection 
29: Client using the ascii protocol 
<29 stats 
<30 new auto-negotiating client connection 
30: Client using the ascii protocol 
<30 stats 
<31 new auto-negotiating client connection 
31: Client using the ascii protocol 
<31 get 28e_CORE_CACHE_OPTIONS 
>31 END 
<31 stats 
<31 delete 28e_TRANSLATE_EN_GB_FRONTEND_1_DEFAULT_XXXXX 
>31 NOT_FOUND 

这是否意味着memcache在我的商店中工作?

再次感谢

+0

请格式化你的配置值,所以我们可以读取XML结构 – 2011-03-03 09:45:41

+0

@乔纳森天请看我的更新问题 – terrid25 2011-03-03 09:50:45

回答

1

当你telnet'd到memcached服务器,运行stats,你会看到缓存成功和失败多少从开始的memcached服务时有发生。这应该会让你很好地指出Magento正在缓存中。

+0

那么,当我刚刚运行该命令,然后运行“统计”'STAT bytes_read'和'STAT bytes_written'似乎增加,无关紧要如果我刷新页面或不。当我刷新我的magento商店时应该发生什么? – terrid25 2011-03-03 10:27:52

0

必须makesure你的PHP环境包括memcached的扩展 但是安装非常方便快捷因此 Ubuntu的通过&安装Debian apt-get的