method KvCacheStore.prototype.clear
KvCacheStore.prototype.clear(): Promise<void>

Removes every key this store owns.

KV has no bulk delete on the binding, so this pages list and issues one delete per key — linear in the number of entries, and worth avoiding on a hot path.

Return Type

Promise<void>

Throws

CloudflareUnsupportedError

When the store has no key prefix

Usage

import { KvCacheStore } from "cloudflare-plugin/src/index.ts";