UNPKG

transitory

Version:

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

9 lines (7 loc) 303 B
import { KeyType } from './KeyType'; import { RemovalReason } from './RemovalReason'; /** * Listener for removal events. Receives the key, value and the reason it * was removed from the cache. */ export type RemovalListener<K extends KeyType, V> = (key: K, value: V, reason: RemovalReason) => void;