public function __construct() { parent::__construct(); $redisHost = Configure::get('redis', 'host'); $redisPort = Configure::get('redis', 'port'); $this->connect($redisHost, $redisPort); }
protected function redis() { $redis = new Redis(); $redis->set('cache', 'test', 10); echo $redis->get('cache'); }