How do set REDIS with APC in magento (local.xml)?

I have to put twice the "< backend >"?

My code looks like this:


  • donot use APC, install ZendOpcache, and keep it only for php, and use Redis only for cache.
    – user2857
    Jun 5, 2015 at 7:32

2 Answers 2


You cant set both as cache backend. But you could chose one as normal backend, and one as slow backend where you currently have file.

I think redis was suited as slow one, but iam not sure about this.


APC is great for OPCode, terrible for data key pair storage. APC should be working as-is with no need to add it to local.xml for handling the cache of PHP's OPcode.

Only one backend handler is allowed, while slow/fast backend types would fall under this branch in the xml tree.

    <session_save><![CDATA[]]></session_save> <!-- db / memcache / empty=files -->
    <session_save_path><![CDATA[]]></session_save_path><!-- e.g. for memcache session save handler tcp:// -->
    <session_cache_limiter><![CDATA[]]></session_cache_limiter><!-- see http://php.net/manual/en/function.session-cache-limiter.php#82174 for possible values -->
        <backend></backend><!-- apc / memcached / xcache / empty=file -->
        <slow_backend></slow_backend> <!-- database / file (default) - used for 2 levels cache setup, necessary for all shared memory storages -->
        <slow_backend_store_data></slow_backend_store_data> <!-- 1 / 0 (default) - used for 2 levels cache setup, sets whether store data in db slow cache backend -->
        <auto_refresh_fast_cache></auto_refresh_fast_cache> <!-- 1 / 0 (default) - used for 2 levels cache setup, sets whether refresh data in fast cache backend -->
        <memcached><!-- memcached cache backend related config -->
            <servers><!-- any number of server nodes can be included -->

    <!-- example of two level cache setup with slow backend at files. -->

    <remote_addr_headers><!-- list headers that contain real client IP if webserver is behind a reverse proxy -->

A good example local.xml from:

Further reading:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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