original_string: function connect(&$err)
  		{
  			if (!function_exists('memcache_pconnect')) {
  				$err = 'Memcache module PECL extension not found!';
  				return false;
  			}
  
  			$memcache = new MemCache;
  
  			if (!is_array($this->hosts)) $this->hosts = array($this->hosts);
  
  			$failcnt = 0;
  			foreach($this->hosts as $host) {
  				if (!@$memcache->addServer($host,$this->port,true)) {
  					$failcnt += 1;
  				}
  			}
  			if ($failcnt == sizeof($this->hosts)) {
  				$err = 'Can\'t connect to any memcache server';
  				return false;
  			}
  			$this->_connected = true;
  			$this->_memcache = $memcache;
  			return true;
  		}
code: function connect(&$err)
  		{
  			if (!function_exists('memcache_pconnect')) {
  				$err = 'Memcache module PECL extension not found!';
  				return false;
  			}
  
  			$memcache = new MemCache;
  
  			if (!is_array($this->hosts)) $this->hosts = array($this->hosts);
  
  			$failcnt = 0;
  			foreach($this->hosts as $host) {
  				if (!@$memcache->addServer($host,$this->port,true)) {
  					$failcnt += 1;
  				}
  			}
  			if ($failcnt == sizeof($this->hosts)) {
  				$err = 'Can\'t connect to any memcache server';
  				return false;
  			}
  			$this->_connected = true;
  			$this->_memcache = $memcache;
  			return true;
  		}
code_tokens: function connect ( & $ err ) { if ( ! function_exists ( 'memcache_pconnect' ) ) { $ err = 'Memcache module PECL extension not found!' ; return false ; } $ memcache = new MemCache ; if ( ! is_array ( $ this -> hosts ) ) $ this -> hosts = array ( $ this -> hosts ) ; $ failcnt = 0 ; foreach ( $ this -> hosts as $ host ) { if ( ! @ $ memcache -> addServer ( $ host , $ this -> port , true ) ) { $ failcnt += 1 ; } } if ( $ failcnt == sizeof ( $ this -> hosts ) ) { $ err = 'Can\'t connect to any memcache server' ; return false ; } $ this -> _connected = true ; $ this -> _memcache = $ memcache ; return true ; }
docstring: implement as lazy connection. The connection only occurs on CacheExecute call
docstring_tokens: implement as lazy connection . The connection only occurs on CacheExecute call