Magento Expert Forum - Improve your Magento experience

Results 1 to 6 of 6

How to use and configure Redis for Magento Caching?

  1. #1
    Junior Member ccvv's Avatar
    Join Date
    Mar 2013
    Posts
    64
    Thanks
    6
    Thanked 17 Times in 13 Posts

    Post How to use and configure Redis for Magento Caching?

    Redis is better than APC and Memcached a lot because it support tags caching very good. Magento base on Zend Framework and Zend Framework caching work fastest with Redis more than APC and memcached so that if you can configure Redis for your magento then your magento site should faster a lot. If you don't know how to install Redis you can try this tutorial for Install Redis Server and PHP Redis on Ubuntu Server . It shouldn't different too much if you install on CentOS or other *Nux OS.


    1. Install Redis. (2.4 is required because it supports operating on multiple keys for many operations)
    2. Install phpredis. For 2.4 support you must use the “variadic” branch: git checkout -t -b variadic origin/variadic, phpredis is optional, but it is much faster than Redisent.
    3. Install this module git://github.com/colinmollenhour/Zend_Cache_Backend_Redis.git
    4. Edit app/etc/local.xml to configure

    Based on this article we have turned off cache disk :

    HTML Code:
    <cache>
        <backend>Zend_Cache_Backend_Redis</backend>
        <slow_backend>database</slow_backend>
        <slow_backend_store_data>0</slow_backend_store_data>
        <auto_refresh_fast_cache>0</auto_refresh_fast_cache>
        <backend_options>
            <server>127.0.0.1</server>
            <port>6379</port>
            <database>database</database>
            <use_redisent>0</use_redisent>  <!-- 0 for phpredis, 1 for redisent -->
            <automatic_cleaning_factor>20000</automatic_cleaning_factor> <!-- optional, 20000 is the default, 0 disables auto clean -->
        </backend_options>
    </cache>
    To check if everything works fine you can use redis-cli :

    Code:
    flexishore@virtualbox:~$ redis-cli
    redis 120.0.01:6379> select database
    OK
    redis 127.0.0.1:6379> keys *
       1) "zc:d:97a_REC_0000000510"
       2) "zc:d:97a_REC_0000000511"
       3) "zc:d:97a_REC_0000001240"
       4) "zc:d:97a_REC_0000000512"
       .......
    As you can see, there are a lot of cache indexes in Redis database.

    Source code : link
    Benchmark class : benchmark.php

    View more threads in the same category:


  2. #2
    Junior Member
    Join Date
    May 2014
    Location
    India
    Posts
    28
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Thanks for the wonderful share. It is an useful post

  3. #3
    [ Contributor ] Wajid Hussain's Avatar
    Join Date
    Nov 2014
    Posts
    204
    Thanks
    3
    Thanked 14 Times in 12 Posts

    Default

    Cloudways provide one-click Magento installation and you can connect Redis with your Magento store in just few steps.

    Check here for how to connect Redis cache with Magento store in just few mintes.

  4. #4
    Junior Member
    Join Date
    May 2015
    Posts
    50
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    thanks for update , what is the advantage of redis compare with other.

  5. #5
    Junior Member aaryanmevada's Avatar
    Join Date
    Apr 2015
    Posts
    54
    Thanks
    2
    Thanked 3 Times in 3 Posts

    Default

    The main advantage of Redis is that databases are created based on demand and they can be indexed only by integers. Redis solves problems that affect cache back ends, still cleaning-up old cache tags is to be done manually. For this, Magento provides garbage cleanup PHP script designed to solve this issue.

  6. #6
    Junior Member
    Join Date
    Aug 2015
    Posts
    12
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Thanks for sharing, I encountered difficulties in magento cache.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •