/** * {@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); } }
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); } }
/** * {@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); } }