A lightweight Node.js library for maintaining a fast local disk-backed cache without strict persistence guarantees. Version 1.3.0 is the latest stable release. It stores data on the filesystem, queuing writes and deletions to be batched and flushed asynchronously. Unlike persistent databases, it prioritizes speed over durability, making it ideal for temporary or disposable caches. It has minimal dependencies and a simple synchronous-like API using async/await.
npm install throwaway-local-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a cache instance in a local folder, puts an entry, retrieves it, deletes it, and flushes all changes to disk.
Call await cache.flush() before exiting to ensure data is written.
Implement your own cleanup logic or use a library like lru-cache if automatic eviction is needed.
Run 'npm install throwaway-local-cache' in your project directory.
Use require() instead of import, or use a bundler that handles CommonJS.
No dependency data recorded yet.