private function connect()
  {
    if ($this->connection) {
      return;
    }

    if (class_exists("Memcached")) {
      $this->mc = new Memcached();
      $this->mc->addServer($this->host, $this->port);
       $this->connection = true;
    } else {
      $this->connection = memcache_pconnect($this->host, $this->port);
    }

    if (! $this->connection) {
      $error = "Couldn't connect to memcache server";

      $this->client->getLogger()->error($error);
      throw new Google_Cache_Exception($error);
    }
  }
private function connect()
  {
    if ($this->connection) {
      return;
    }

    if (class_exists("Memcached")) {
      $this->mc = new Memcached();
      $this->mc->addServer($this->host, $this->port);
       $this->connection = true;
    } else {
      $this->connection = memcache_pconnect($this->host, $this->port);
    }

    if (! $this->connection) {
      $error = "Couldn't connect to memcache server";

      $this->client->getLogger()->error($error);
      throw new Google_Cache_Exception($error);
    }
  }
private function connect ( ) { if ( $ this -> connection ) { return ; } if ( class_exists ( "Memcached" ) ) { $ this -> mc = new Memcached ( ) ; $ this -> mc -> addServer ( $ this -> host , $ this -> port ) ; $ this -> connection = true ; } else { $ this -> connection = memcache_pconnect ( $ this -> host , $ this -> port ) ; } if ( ! $ this -> connection ) { $ error = "Couldn't connect to memcache server" ; $ this -> client -> getLogger ( ) -> error ( $ error ) ; throw new Google_Cache_Exception ( $ error ) ; } }
Lazy initialiser for memcache connection. Uses pconnect for to take
advantage of the persistence pool where possible.
Lazy initialiser for memcache connection . Uses pconnect for to take advantage of the persistence pool where possible .