A disk-based persistent cache library for Node.js (v0.13.0, requires Node >=22). It stores key-value pairs as files on disk, supports optional TTL, and provides synchronous API for most operations. Includes DiskCache, DiskCacheWithCache (in-memory + disk), DiskCacheView (typed keys/values via converters), and DiskCacheAsyncView (async converters). Differentiators: full TypeScript support, minimal dependencies, sync API for simplicity, and composable view layers. Alternative to quick-lru or lru-cache for persistent use cases.
npm install extra-disk-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a DiskCache, sets a key with TTL 1 hour, retrieves it, and closes the cache.
Use `await DiskCache.create(path)`
Wrap values in Buffer.from() or use DiskCacheView with a converter
Upgrade to Node.js >=22
Run `npm install extra-disk-cache`
Use `import { DiskCache } from 'extra-disk-cache'`