Is it possible to configure timeout on redis connect()?

I've done a bit of searching but only found some references to a deprecated setTimeout() method. Is this supported in Phalcon? Thanks



83.7k

it is a redis function call by the framework

https://github.com/phalcon/cphalcon/pull/14500

with next 3.4.x release warrning should be gone, just use older redis package for a bit

I still didn't find any documentation on how to use it except in the Phalcon source itself. Will this work?

$session = new \Phalcon\Session\Adapter\Redis(array(
    'uniqueId'   => 'uniqueId',
    'host'       => 'localhost',
    'auth'       => 'secret',
    'port'       => 6379,
    'persistent' => false,
    'lifetime'   => 1209600,
    'prefix'     => 'prefix_',
    'timeout' => 3,
));