Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function lastAction($key = null)
 {
     $lastCode = $this->memcache->getResultCode();
     if ($lastCode == 47 || $lastCode == 35) {
         if ($key) {
             $server = $this->memcache->getServerByKey($key);
             $host = $server['host'];
             $port = $server['port'];
             $this->fail("{$host}:{$port}");
         }
         return false;
     }
     return true;
 }
 /**
  * Get server information by key.
  *
  * @link    http://www.php.net/manual/en/memcached.getserverbykey.php
  *
  * @param   string      $server_key     The key identifying the server to store the value on.
  * @return  array                       Array with host, post, and weight on success, FALSE on failure.
  */
 public function getServerByKey($server_key)
 {
     return $this->m->getServerByKey($server_key);
 }