TypeScript Cacheable Decorator
JSON →TypeScript Cacheable is an in-memory memoization decorator library designed to cache the results of expensive TypeScript methods or property accessors. Currently at version 3.0.3, it provides a stable API for enhancing application performance by storing computed values for subsequent retrieval. The library distinguishes itself by offering flexible caching scopes: 'GLOBAL' for application-wide caching, and 'LOCAL_STORAGE' which leverages Node.js's `AsyncLocalStorage` to provide request-scoped or call-chain-scoped caching, crucial for web applications. Cache keys can be automatically inferred from method parameters if they are JSON-serializable, or explicitly defined by implementing the `CacheableKey` interface for complex objects. While the library itself does not have a stated release cadence, its `3.x` version indicates active development and maintenance.
Traffic · last 30 days ↑0% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇨🇭 Switzerland · 🇩🇪 Germany · 🇫🇷 France