diff --git a/kcidb/cache/__init__.py b/kcidb/cache/__init__.py index 73258c3f..d405d362 100644 --- a/kcidb/cache/__init__.py +++ b/kcidb/cache/__init__.py @@ -157,3 +157,9 @@ def fetch(self, url): if blob.exists(): return blob.download_as_bytes() return None + + def empty(self): + """Empty the cache (remove all contents).""" + bucket = self.client.bucket(self.bucket_name) + for blob in bucket.list_blobs(): + blob.delete()