An in-memory cache for Node.js with auto-refresh and auto-flush mechanisms. Version 0.0.5 (last release, no recent updates). It allows setting, getting, and subscribing to a refresh loop. Differentiates from simple caches by providing a subscription model for asynchronous refresh of expired keys. Requires Node 0.8.0. No longer actively maintained.
npm install nice-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a nice-cache instance with refresh interval, setting and getting cached values, and subscribing a refresh function for background updates.
Consider using a modern caching library like lru-cache or node-cache.
Use a Node 12+ compatible cache library.
Explicitly pass { singleton: false } to create separate instances.Ensure sub() is called before refresh() for a given key/type.
Use const Cache = require('nice-cache'); const cache = new Cache();Ensure new Cache() is called and assigned to a variable.
No dependency data recorded yet.