Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

glass

This cache is very simple, and meant to be entirely transparent. It takes variable args and the cache is immutable. :

package.json:

"dependencies" : {
  "cthrough" : "chb0github/cthrough"
}

usage:

Most basic:

const cache = require('cthrough');

const myFunc = cache((someArg) => `{Math.random()} {someArg}`);
myFunc(arg)
const cache = require('cthrough');

const myFunc = cache((secretId) => getFromAws(secretId), (keyId) => // return true on expired key);

myFunc("fooKey");

About

A simple transparent cache

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages