cakephp3 redis not configured properly

352 Views Asked by At

I am having a super hard time getting redis to be configured. It was working, but I upgraded my servers and composer updated- now I getting "redis is not configured correctly"

     define('_CACHE_SERVER', '*********.cache.amazonaws.com:6379');


     '_cake_core_' => [
        'className' => 'Redis',
        'servers'=> [ _CACHE_SERVER ],
        'prefix' => 'mrg_cake_core_',
        'serialize' => 'php',
        'duration' => '+2 minutes',
    ],

I have written a blank php and connected to redis with just simple $redis = new Redis(); and got $redis->lastSave(); Seems like something changed in CAKE. Very confused.

1

There are 1 best solutions below

0
On

Thank you ndm, I changed the config to:

    define('_CACHE_SERVER', '************.cache.amazonaws.com');

    '_cake_core_' => [
        'className' => 'Redis',
        'host' => _CACHE_SERVER,
        'port' => 6379,
        'prefix' => 'myapp_cake_core_',
        'duration' => '+1 years',
        'url' => env('CACHE_CAKECORE_URL', null),
    ],