genericcache

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

Generic Cache

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

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