UNPKG

transitory

Version:

In-memory cache with high hit rates via LFU eviction. Supports time-based expiration, automatic loading and metrics.

7 lines (6 loc) 217 B
import { KeyType } from '../KeyType'; /** * Function used to load a value in the cache. Can return a promise or a * value directly. */ export declare type Loader<K extends KeyType, V> = (key: K) => Promise<V> | V;