UNPKG

@m4x1m1l14n/cache

Version:

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

18 lines (17 loc) 586 B
export interface CacheOptions { /** * Maximum number of items stored in cache */ maxItems?: number; /** * @deprecated This option is deprecated. The cache now uses dynamic timeout scheduling * for accurate expiration timing instead of periodic cleanup intervals. * Items are now expired at their exact TTL expiration time rather than being * checked periodically. This option is kept for backward compatibility but has no effect. */ resolution?: number; /** * Default timeout for added item */ defaultTTL?: number; }