/** * @return bool * @throws StorageException */ public function flush() : bool { $flush = $this->cache->flush(); if (!$flush) { $error = !empty($this->cache->lastError()) ? $this->cache->lastError() : 'Failed'; throw StorageException::flushError(__METHOD__, $error); } return true; }