2011-03-03 66 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的