clear method

Future<void> clear({
  1. Map<String, dynamic>? metadata,
})

Clear all entries from the cache.

Removes all data in this cache's environment.

Example:

await cache.clear();

Implementation

Future<void> clear({Map<String, dynamic>? metadata}) async {
  final ctx = PVCtx(
    cache: this,
    actionType: ActionType.clear,
    initialMeta: metadata ?? {},
  );
  await ctx.queue(_orderedClearHooks);
}