This is an example:
$di->setShared('session', function() {
$session = new Phalcon\Session\Adapter\Redis(array(
'path' => "tcp://127.0.0.1:6379?weight=1",
'name' => SITE_DOMAIN . '-'
));
$session->start();
return $session;
});
on Controller..
$this->session->set(self::BTS_SESSION_USER_ID, 1);
$this->session->set(self::BTS_SESSION_USER_NAME, 'hugo');
But when i do:
$this->session->destroy();
The session persist! and not clean!