1.1.3 • Published 4 years ago

hideko-caching v1.1.3

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

hideko-cache

Cache library used by Hideko discord bot

Installation

$ npm install hideko-cache

Usage

const HidekoCache = require("hideko-cache");
const cache = new HidekoCache(60); // in seconds

const obj = "object"; // string, number, boolean, object, array

cache.set(obj, "cache-key"); // set the cache

cache.remove("cache-key"); // remove from the cache

// cache that exists
cache.get("cache-key"); // return obj

// cache that doesn't exists
cache.get("cache"); // return undefined
1.1.3

4 years ago

1.1.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago