1.0.0 • Published 8 years ago

redis-page-cache v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

Redis Page Cache Module

###Installation: npm install redis-page-cache

Requires a redis client

###Example: Using express

var redis = require('redis');
var redisPageCache = require('redis-page-cache');

var client = redis.createClient();
...

app.get('/test', function(req, res) {

  var options = {
    client: client,
    key: 'myUniqueKey',
    file: 'path/to/file'
  };

  redisPageCache(options, function(err, html) {
    if (err) {
      //handle error
    } else {
      res.send(html);  
    }
  });
  
});