diff --git a/lib/mongoCache.js b/lib/mongoCache.js index 7156d72..4c19a06 100644 --- a/lib/mongoCache.js +++ b/lib/mongoCache.js @@ -25,7 +25,7 @@ module.exports = { return next(); } - this.cache.get(req.url, function (err, result) { + this.cache.get(req.prerender.url, function (err, result) { if (!err && result) { res.send(200, result); } else { @@ -35,7 +35,7 @@ module.exports = { }, afterPhantomRequest: function(req, res, next) { - this.cache.set(req.url, req.prerender.documentHTML); + this.cache.set(req.prerender.url, req.prerender.documentHTML); next(); } };