File-based caching library for Node.js (v1.1.0, stable, updated 2024). Fork of cacheman-file with support for Node.js 20+ and TypeScript types. Provides a simple key-value store on disk with TTL support. Used as a cache engine for the recacheman multi-engine cache library. Offers set, get, del, clear, getAll operations. Alternative to node-cache or memory-cache with persistent storage.
npm install recacheman-fileNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic usage: create a file cache instance, set a value with TTL, retrieve it, then delete.
Upgrade to Node.js 20+ or use recacheman-file@0.x.
Specify a custom directory via constructor options: new CachemanFile({dir: '/my/cache/path'})Ensure TTL is in seconds (e.g., 3600 for 1 hour).
Wrap calls in a Promise if needed: const get = (key) => new Promise((resolve, reject) => cache.get(key, (err, val) => err ? reject(err) : resolve(val)));
Ensure /tmp is writable or specify a custom directory with write permissions.
Use: const cache = new CachemanFile();
Run 'npm install recacheman-file' and ensure require('recacheman-file') is correct.No dependency data recorded yet.