public function test_init_with_wrong_server() { $this->memcache = new AkMemcache(); $res = $this->memcache->init(array('servers' => array('test:121'))); $this->assertFalse($res); $this->assertError('Could not connect to MemCache daemon'); }
function _checkMemcacheInstallation($socket = null) { if ($socket == null) { $socket = $this->settings['memcached-socket']; if (empty($socket)) { return true; } } require_once AK_BASE_DIR . DS . 'lib' . DS . 'AkCache' . DS . 'AkMemcache.php'; $memcache = new AkMemcache(); return @$memcache->init(array('servers' => array($socket))); }
static function isServerUp($options = array()) { $options['silent_mode'] = true; $Memcached = new AkMemcache(); return $Memcached->init($options) != false; }