A lightweight cache plugin for superagent-cache and cache-service, and a standalone in-memory cache optionally backed by localStorage or sessionStorage. Version 2.0.1 is the latest stable release with no release cadence noted. It provides background refresh, per-key expiration, robust API, and compatibility with cache-service and superagent-cache. Compared to alternatives, it integrates tightly with the cache-service ecosystem and supports browser storage without external dependencies.
npm install cache-service-cache-moduleNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Instantiates CacheModule with sessionStorage and default expiration, then performs set, get, and flush operations.
Use the correct npm package name 'cache-service-cache-module'.
Set a unique 'type' config property for each instance that uses localStorage/sessionStorage.
Ensure backgroundRefreshInterval <= backgroundRefreshMinTtl or set backgroundRefreshIntervalCheck to false.
Consider migrating to a maintained alternative such as 'cache-manager' or 'node-cache'.
Use: const CacheModule = require('cache-service-cache-module');
new CacheModule({...});Do not set storage config in Node.js; it will default to in-memory cache. Or conditionally set storage only in browser.
Set backgroundRefreshInterval to a value <= backgroundRefreshMinTtl, or set backgroundRefreshIntervalCheck: false.
No dependency data recorded yet.