Use phalcon 3.1.1, php7.0.11, Redis 3.2.100
I have redis registered like so
use Phalcon\Cache\Backend\Redis;
use Phalcon\Cache\Frontend\Igbinary as FrontData;
$di->setShared('cache', function (){
$frontCache = new FrontData(['lifetime' => 120]);
$cache = new Redis($frontCache,[
"host" => '127.0.0.1',
"port" => 6379,
"auth" => '',
"persistent" => false,
"index" => 0,
]);
return $cache;
});
Using it like so:
$copList = $this->cache->get('player_cop_list');
if($copList === null)
{
$copList = Players::find("coplevel > '0'");
$this->cache->save('player_cop_list', $copList, 900);
}
but I get the error PHP Fatal error: Class 'redis' not found
when running the code.