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

Remove all entries scoped to this backend's prefix.

The prefix is provided at construction time (not per-call), so each backend can scope the clear appropriately:

  • Redis: SCAN MATCH ${prefix}* + batch DEL
  • Memory: empty the internal map (each plugin instance owns its own map, so it naturally holds only this prefix's keys)

Return Type

Promise<void>

Usage

import { MemoryStore } from "cache-plugin/src/index.ts";