/** * @param string $id * @return bool * @throws StorageException */ public function delete(string $id) : bool { $delete = $this->cache->delete("sess_" . $id); if (!$delete) { $error = !empty($this->cache->lastError()) ? $this->cache->lastError() : 'Failed'; throw StorageException::deleteError(__METHOD__, $error); } return true; }