MemoizationCache

import { MemoizationCache } from "jsr:@ende/cache/memoize";

interface ยท experimental

interface MemoizationCache<K, V>

A cache suitable for use with memoize.

Methods

has

has(key: K): boolean

Checks whether a value for the given key exists in the cache.

get

get(key: K): V | undefined

Returns the cached value associated with the given key, if present.

set

set(key: K, val: V): unknown

Stores a value in the cache under the given key.

delete

delete(key: K): unknown

Removes the value associated with the given key from the cache.

Source