Since: 1.0
Author: Bernhard Schussek (bschussek@gmail.com)
Inheritance: extends RuntimeExceptio\RuntimeException
 /**
  * {@inheritdoc}
  */
 public function clear()
 {
     try {
         $this->clientClear();
     } catch (Exception $e) {
         throw WriteException::forException($e);
     }
 }
 /**
  * {@inheritdoc}
  */
 public function clear()
 {
     try {
         $this->collection->drop();
     } catch (Exception $e) {
         throw WriteException::forException($e);
     }
 }
Example #3
0
 private function doUpdate($key, $value)
 {
     $serialized = Serializer::serialize($value);
     try {
         $this->connection->update($this->tableName, array('meta_value' => $serialized), array('meta_key' => $key));
     } catch (Exception $e) {
         throw WriteException::forException($e);
     }
 }
Example #4
0
 /**
  * {@inheritdoc}
  */
 public function clear()
 {
     try {
         $bucket = $this->client->bucket($this->bucketName);
         foreach ($bucket->getKeys() as $key) {
             $bucket->get($key)->delete();
         }
     } catch (Exception $e) {
         throw WriteException::forException($e);
     }
 }