UNPKG

@m4x1m1l14n/cache

Version:

Lightweight in-memory isomorphic cache implementation with TTL for browser & Node JS written in TypeScript

8 lines (7 loc) 172 B
import { ExpirationCallback } from '../types'; export interface CacheValue<T> { created: number; ttl: number; value: T; callback?: ExpirationCallback<T>; }