effective-cache
v0.1.0
Published
Rate limit guard is a library that helps to prevent overload of the Node.js server. This plugin can help to reduce the timing of the execution of requests. Usually, if you have more requests than your applications can handle it creates a big queue of requ
Downloads
1
Readme
Cache
Key Benefits:
How to Install
npm install --save effective-cache
How to Use
s3-fifo cache example
Based on this paper
import { S3FifoCache } from 'effective-cache';
const cache = new S3FifoCache(100);
cache.set("key", "value");
cache.set("key2", "value");
cache.get("key") // -> "value"
cache.has("key") // -> true
cache.delete("key");
cache.get("key") // -> undefined
cache.clear();