Example #1
0
 private function _connect()
 {
     $this->r = new \Redis();
     if ($this->r->connect($this->_config['redis_server']) == true) {
         $this->r->setOption(\Redis::OPT_SERIALIZER, \Redis::SERIALIZER_PHP);
         return true;
     }
     return false;
 }
Example #2
0
 protected function connect()
 {
     $this->r = new \Redis();
     Debugger::checkpoint('Cache: before redis connect');
     if ($this->r->connect($this->_config['redis_server']) == true) {
         $this->r->setOption(\Redis::OPT_SERIALIZER, \Redis::SERIALIZER_PHP);
         Debugger::checkpoint('Cache: after redis connect');
         return true;
     }
     return false;
 }