A simple JavaScript cache library that supports key-value storage with configurable expiration times and namespacing. Version 1.0.0 (stable, last updated 2017) is available via npm and Bower. It offers a concise API with function overloads for get/set/remove and namespace support, allowing hierarchical sub-caches with independent expiry. The library is lightweight and works in Node.js and browsers via script tag or AMD.
npm install expire-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic set/get with default and custom expiry, namespace usage, and removal.
Use .get() and .set() for clarity.
Consider alternatives like lru-cache or node-cache.
Use an array for multiple keys: .remove(['key1', 'key2']).
Explicitly set a large expire value if you want persistent cache.
Ensure require('expire-cache') returns a function. In browser, check script src.Use const expireCache = require('expire-cache') instead of import.Use the script tag method: <script src="node_modules/expire-cache/index.js"></script>
No dependency data recorded yet.