catche
v0.1.1
Published
Caching async calls with TTL
Downloads
2
Readme
catche
Caching async calls with TTL
Purpose
This general purpose cache aims to simplify storage of asynchronous API call data. It is small in size, dependency free and not tied to any framework.
Usage
const cache = require('catche').global;
let data = cache.get('/myapi/key1');
const cache = require('catche').use('some-module-name');
cache.get('/myapi/key1');
const catche = require('catche');
module.exports = catche.create();
import { global as cache } from 'catche';
import { useCache } from 'catche';
const cache = useCache('some-module-name');
cache.get('/myapi/key1');
import { createCache } from 'catche';
const cache = catche.new();
export default cache;