0.0.2 • Published 3 years ago

func-memoize v0.0.2

Weekly downloads
55
License
ISC
Repository
-
Last release
3 years ago

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...