Exemplo n.º 1
0
 /**
  * Deletes all cache entries
  *
  * @return bool
  */
 public function clear()
 {
     try {
         return $this->cache->flush();
     } catch (\CouchbaseException $e) {
         return false;
     }
 }
Exemplo n.º 2
0
 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);
 }