A simple in-memory cache for node.js
There are no type limitations. You can cache almost everything.
npm i simple-node-cache
import { CacheManager } from 'simple-node-cache';
const cache = new CacheManager();
cache.set('key', 'value');
console.log(cache.get('key'));
Stores value with given key
Caution: This overrides existing value
Deletes value with given key
Set Time To Live in seconds
Get value by given key
Returns undefined
if there is no key
Deletes all keys
Get current number of entries
Get all cache keys