Skip to content

chb0github/cthrough

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published