node package manager
Loosely couple your services. Use Orgs to version and reuse your code. Create a free org »

genericcache

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);