A Node.js hybrid caching library combining LRU in-memory cache with file-based persistence for automatic fallback and data recovery across restarts. Current stable version 1.0.31, updated periodically. Key differentiator: seamless integration of memory and disk caching without manual sync, suitable for read-heavy workloads where cache durability matters.
npm install mega-hybrid-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes a hybrid cache with memory limit and file path, sets, gets, and deletes a value.
Ensure directory exists or use absolute path in system temp.
Always use await or .then() when calling async methods.
Monitor cache size via cache.size property or set appropriate memoryMaxSize.
Only store JSON-serializable values.
Update constructor call to pass { memoryMaxSize, filePath, ttl }.Use import HybridCache from 'mega-hybrid-cache'
Create directory or use existing path.
Store a serializable copy or use a library like flatted.
No dependency data recorded yet.