private function connect()
	{
		// We want to only create the driver once.
		if ($this->driver)
		{
			return;
		}

		$pool = $this->options['memcache.pool'];

		if ($pool)
		{
			$this->driver = new \Memcached($pool);
		}
		else
		{
			$this->driver = new \Memcached;
		}

		$this->driver->setOption(\Memcached::OPT_COMPRESSION, $this->options['memcache.compress'] ?: false);
		$this->driver->setOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE, true);
		$serverList = $this->driver->getServerList();

		// If we are using a persistent pool we don't want to add the servers again.
		if (empty($serverList))
		{
			$servers = $this->options['memcache.servers'] ?: array();

			foreach ($servers as $server)
			{
				$this->driver->addServer($server->host, $server->port);
			}
		}
	}
private function connect()
	{
		// We want to only create the driver once.
		if ($this->driver)
		{
			return;
		}

		$pool = $this->options['memcache.pool'];

		if ($pool)
		{
			$this->driver = new \Memcached($pool);
		}
		else
		{
			$this->driver = new \Memcached;
		}

		$this->driver->setOption(\Memcached::OPT_COMPRESSION, $this->options['memcache.compress'] ?: false);
		$this->driver->setOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE, true);
		$serverList = $this->driver->getServerList();

		// If we are using a persistent pool we don't want to add the servers again.
		if (empty($serverList))
		{
			$servers = $this->options['memcache.servers'] ?: array();

			foreach ($servers as $server)
			{
				$this->driver->addServer($server->host, $server->port);
			}
		}
	}
private function connect ( ) { // We want to only create the driver once. if ( $ this -> driver ) { return ; } $ pool = $ this -> options [ 'memcache.pool' ] ; if ( $ pool ) { $ this -> driver = new \ Memcached ( $ pool ) ; } else { $ this -> driver = new \ Memcached ; } $ this -> driver -> setOption ( \ Memcached :: OPT_COMPRESSION , $ this -> options [ 'memcache.compress' ] ? : false ) ; $ this -> driver -> setOption ( \ Memcached :: OPT_LIBKETAMA_COMPATIBLE , true ) ; $ serverList = $ this -> driver -> getServerList ( ) ; // If we are using a persistent pool we don't want to add the servers again. if ( empty ( $ serverList ) ) { $ servers = $ this -> options [ 'memcache.servers' ] ? : array ( ) ; foreach ( $ servers as $ server ) { $ this -> driver -> addServer ( $ server -> host , $ server -> port ) ; } } }
Connect to the Memcached servers if the connection does not already exist.

@return  void

@since   1.0
Connect to the Memcached servers if the connection does not already exist .