Recently i have started using Phalcon, I want use Redis for session management, But i don't want to stop using php session as well, Presently i am able to make session with each of them but one at a time, So what i tried is as following :
use Phalcon\Session\Adapter\Files as SessionAdapter;
use Phalcon\Session\Adapter\Redis as RedisSessionAdapter;
$di->setShared('session',
function () { $session = new SessionAdapter(); $session->start(); return $session;
});
$di->setShared('sessionRedis',
function () { $session = new RedisSessionAdapter(array( "scheme" => "tcp", 'uniqueId' => 'my-private-app', 'host' => '192.168.3.2', 'port' => '6379', 'persistent' => false, 'lifetime' => '60', 'prefix' => 'my_' )); $session->start(); return $session;
});
Plz can some one answer this?