/** * Deletes all cache entries * * @return bool */ public function clear() { try { return $this->cache->flush(); } catch (\CouchbaseException $e) { return false; } }
public static function setUpBeforeClass() { if (!extension_loaded('couchbase') || !class_exists('Couchbase')) { static::$cache = null; return; } $couchbase = new \Couchbase('127.0.0.1', '', '', 'cachalot-test'); $couchbase->flush(); static::$cache = new \Cachalot\CouchbaseCache($couchbase); }