A lightweight Node.js local JSON cache for reading and writing JSON objects to disk. Version 0.1.0 is the current release with no defined release cadence. It offers simple synchronous file operations for small-scale caching needs, but lacks asynchronous support, TTL, or advanced features found in alternatives like node-cache or flat-cache. Best suited for quick prototyping or non-performance-critical scripts.
npm install local-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows synchronous write and read of a JSON object to a local cache file.
Use for small scripts or wrap in async function with worker threads if needed.
Implement your own cleanup or use a library with TTL support.
Wrap calls in try-catch blocks.
Use absolute paths or chdir before instantiation.
Ensure the directory exists or create it before using cache.
Use `const cache = new Cache();`
Check file content or use try-catch to handle parse errors.
No dependency data recorded yet.