Interface KeyedCacheStorage<Key, Value>

A backing cache for a keyed suspense. Provide get and set functions.

Usefully, the built-in Map and WeakMap already implement this interface. Plenty of other libraries do too, like many-keys-map, and quick-lru.

interface KeyedCacheStorage {
    get(key): undefined | Value;
    set(key, value): void;
}

Type Parameters

  • Key

  • Value

Methods

Methods

Generated using TypeDoc