ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Redis and native caching

November 18, 2014 12:26pm

Subscribe [2]
  • #1 / Nov 18, 2014 12:26pm

    Transparency

    7 posts

    I’m being told by the docs that Redis is supported in 2.8.x and that all I need is a locally running instance of a Redis server using the default port, and I just have to select the Redis driver from the admin->general page as the caching driver choice.
    And yet I’m consistently being told that EE cannot connect to Redis.

    Redis is running and I can interact with it from the command line, but EE seems incapable.

    Has anybody out there successfully used Redis for native caching (not ce_cache, which cannot cope with layouts) and if so, can you please tell me what magic you used to make it happen?

    Many thanks in advance,

    Andy

  • #2 / Dec 16, 2014 10:46am

    Jacek Sompel

    15 posts

    Hey Andy,

    You’re not alone.
    I’ve tried almost every configuration possible to get EE 2.9.2 to work with my Redis server without any luck. It just doesn’t seem to work at all.
    I tried adding config overrides:

    $config['redis'] = array(
      'host' => 'localhost',
      'password' => NULL,
      'port' => 6379,
      'timeout' => 0
    );

    or

    $config['redis'] = array(
      'host' => '127.0.0.1',
      'password' => NULL,
      'port' => 6379,
      'timeout' => 0
    );

    I know my redis server work as I have other sites (Magento) on that same server that use Redis without any problems at all. EE just keeps on returning the error “Cannot connect to Redis, using File driver instead”.
    Even if you go to Tools -> Utilities -> PHP Info it shows that Redis is enabled:

    Redis Support enabled
    Redis Version 2.2.5

    I wonder if guys at EllisLab got this cache driver to work in their test lab.

    Cheers,
    Jacek

  • #3 / Dec 16, 2014 10:53am

    Jacek Sompel

    15 posts

    Just found a solution to this:

    Put this in your config.php:

    $config['cache_driver'] = 'redis';

    Reference to another issue that was related to memcached

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases