Beispiel #1
0
 public function isAlive()
 {
     $this->ensureTriedToConnect();
     try {
         $this->alive = $this->redis->ping() == '+PONG';
     } catch (\RedisException $e) {
         $this->alive = false;
     }
     return parent::isAlive();
 }
 /**
  * @return BaseAggregateCache
  **/
 protected function doAddPeer($label, CachePeer $peer)
 {
     if (isset($this->peers[$label])) {
         throw new WrongArgumentException('use unique names for your peers');
     }
     if ($peer->isAlive()) {
         $this->alive = true;
     }
     $this->peers[$label]['object'] = $peer;
     $this->peers[$label]['stat'] = [];
     return $this;
 }
Beispiel #3
0
 public function isAlive()
 {
     $this->ensureTriedToConnect();
     return parent::isAlive();
 }
Beispiel #4
0
 public function isAlive()
 {
     return $this->innerPeer->isAlive();
 }