Closed jamemackson closed 7 years ago
this PR adds a boolean enabled option to the getFromRedis middleware function, which inherently also disables the addToRedis function as the request param to trigger the caching never gets set.
getFromRedis
addToRedis
The option is enabled by default.
example usage:
getFromRedis(redis, { naiveCacheExpiry: false, enabled: process.env.REDIS_CACHE_ENABLED || true })
this PR adds a boolean enabled option to the
getFromRedis
middleware function, which inherently also disables theaddToRedis
function as the request param to trigger the caching never gets set.The option is enabled by default.
example usage: