cache-holder

0.0.2 • Public • Published

cacheHolder

Temporary holder for your cache values. Automatically deletes old not topical values.

var CacheHolder = require("cacheHolder");

var options = {}; options.livingTime = 2; // estimated living time in days; options.values = [{value = 'some value'}] // values from cache;

var holder = new CacheHolder(options);

Have methods :

holder.addValue(value)// ads value to holder, returns true if this value is already in holder holder.getAllValues()//returns values from cache holder.haveThisValue(somevalue) // return true if this value already exists in cache holder.isEmpty()// return true if holder have no values.

/cache-holder/

    Package Sidebar

    Install

    npm i cache-holder

    Weekly Downloads

    0

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • antypko