2

I have strange issue with memcached configuration with my Magento setup

here is my local.xml

<?xml version="1.0"?>
<config>
    <global>
    <cache>
        <!-- <backend>apc</backend> -->
        <backend>memcached</backend>
            <prefix>MYTAG_</prefix>
            <memcached>
                <servers>
                    <server>
                        <host><![CDATA[127.0.0.1]]></host>
                        <port><![CDATA[11211]]></port>
                        <persistent><![CDATA[1]]></persistent>
                    </server>
                </servers>
                <compression><![CDATA[0]]></compression>
                <cache_dir><![CDATA[]]></cache_dir>
                <hashed_directory_level><![CDATA[]]></hashed_directory_level>
                <hashed_directory_umask><![CDATA[]]></hashed_directory_umask>
                <file_name_prefix><![CDATA[]]></file_name_prefix>
            </memcached>
        </cache>
        <install>
            <date><![CDATA[Fri, 01 Feb 2013 06:28:50 +0000]]></date>
        </install> 
        <crypt>
            <key><![CDATA[XXXXXXXXXXXXXXXXXXX]]></key>
        </crypt>
        <disable_local_modules>false</disable_local_modules>
        <resources>
            <db>
                <table_prefix><![CDATA[]]></table_prefix>
            </db>
            <default_setup>
                <connection> 
                    <host><![CDATA[xxxxxxx]]></host>
                    <username><![CDATA[xxxxxxxx]]></username>
                    <password><![CDATA[xxxxxxx]]></password>
                    <dbname><![CDATA[xxxxxxxx]]></dbname>
                    <initStatements><![CDATA[SET NAMES utf8]]></initStatements>
                    <model><![CDATA[mysql4]]></model>
                    <type><![CDATA[pdo_mysql]]></type>
                    <pdoType><![CDATA[]]></pdoType>
                    <active>1</active>
                </connection>
            </default_setup>
        </resources>
        <session_save><![CDATA[files]]></session_save>
    </global>
    <admin>
        <routers>
            <adminhtml>
                <args>
                    <frontName><![CDATA[admin]]></frontName>
                </args>
            </adminhtml>
        </routers>
    </admin>

<frontend>
    <events>
        <controller_action_predispatch>
            <observers><log><type>enabled</type></log></observers>
        </controller_action_predispatch>
        <controller_action_postdispatch>
            <observers><log><type>enabled</type></log></observers>
        </controller_action_postdispatch>
        <customer_login>
            <observers><log><type>disabled</type></log></observers>
        </customer_login>
        <customer_logout>
            <observers><log><type>disabled</type></log></observers>
        </customer_logout>
        <sales_quote_save_after>
            <observers><log><type>disabled</type></log></observers>
        </sales_quote_save_after>
        <checkout_quote_destroy>
            <observers><log><type>disabled</type></log></observers>
        </checkout_quote_destroy>
    </events>
  </frontend> 
</config>

All the caching files are generated in Magento's setup var/cache its not directly using memcached directory and every time it is getting full.

In correct manner var/cache should always remain empty.

Will you please help me to set correct way of memcached?

2

Here is a working example of Memecached: It looks like yours is a little different. Have you confirmed that memcache is working? btw: REDIS is a much faster option.

<cache>
    <backend>memcached</backend>
    <slow_backend>database</slow_backend>
        <memcached>
        <servers>
            <server>
            <host><![CDATA[127.0.0.1]]></host>
            <port><![CDATA[11211]]></port>
            <persistent><![CDATA[0]]></persistent>
            <weight><![CDATA[2]]></weight>
            <timeout><![CDATA[10]]></timeout>
            <retry_interval><![CDATA[10]]></retry_interval>
            <status><![CDATA[]]></status>
            </server>
        </servers>
        <compression><![CDATA[0]]></compression>
        <cache_dir><![CDATA[]]></cache_dir>
        <hashed_directory_level><![CDATA[]]></hashed_directory_level>
        <hashed_directory_umask><![CDATA[]]></hashed_directory_umask>
        <file_name_prefix><![CDATA[]]></file_name_prefix>
    </memcached>
</cache>
  • brentwpeterson, thanks for your valuable reply.Is in your configuration var/cache empty every time? – liyakat Mar 16 '15 at 4:33
  • The cache directory is created but it is empty. – brentwpeterson Mar 16 '15 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.