1.0.10 • Published 4 months ago

rgcache v1.0.10

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

rgcache

Little caching module.

Installing

npm install rgcache
yarn add rgcache

Example

let Cache = require('rgcache').Cache;
let aCache = new Cache({
    ttl: 600, loader: async (key) => {
        console.log("loader call");
        return key.toLowerCase();
    }
});

(async () => {
    console.log(await aCache.get("BAN"));
    await aCache.get("BAN");
    aCache.delete("BAN");
    await aCache.get("BAN");
    aCache.set("LOL", "lols");
    console.log(await aCache.get("LOL"))
    aCache.clear();
    console.log(await aCache.get("LOL"))
    console.log(aCache.stats());
})();```
1.0.10

4 months ago

1.0.9

7 months ago

1.0.8

9 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

1 year ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2-4

2 years ago

1.0.2-4n

2 years ago

1.0.2-3

2 years ago

1.0.2-2

2 years ago

1.0.2-1

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0-2

2 years ago

1.0.0-1

2 years ago

1.0.0

2 years ago