func-memoize
v0.0.2
Published
Memoization of function with a distributed cache like Redis
Downloads
7
Readme
Function Memoizer
To cache the output of any function with a distribution memory cache like Redis
Usage
const FuncMemoize = require('func-memoize');
FuncMemoize.init({ redisClient: existingRedisClient });
const yourCachedFunction = FuncMemoize.cache(yourFunction, { ttl: 10 /* Sec */ });
yourCachedFunction(/* same parameters as yourFunction */);
Roadmap
- [ ] Support for simple single process in-memory cache
- [ ] Support for memcached
- [ ] Support for Redis cluster/replica
- [ ] Add benchmark samples
- [ ] and more...