RequestCache
RequestCache is a drop-in replacement for the request module, which has the added ability to easily cache http responses to Redis.
Install
$ npm install requestcache
Usage
var request = ; ; var redisConfig = host: "" port: 6968 password: ""; request; request; request;
It's that simple, you just drop it in, pass one config option though and bingo!
Config
The setupRedisCache function takes two parameters, the client and the options. Currently for the client you can pass through an object containing the details and it'll create one for you, or you can pass through a node_redis client and it'll use that.
Currently the options only accept the redisPrefix option which adds a prefix to all redis entries.