genericcache

A very simple generic interface for caching stuff with switchable backends.

npm install genericcache
3 downloads in the last week
12 downloads in the last month

Generic Cache

A very simple generic interface for caching stuff with switchable backends.

Example

var cache = genericCache(options.cache === 'memcached' ? genericMemcachedCache : genericMemoryCache, options.cacheOptions),
cache.get(cacheKey, function (err, result) {});
cache.set(cacheKey, result, ttl);
npm loves you