Skip to content

Commit e354c9a

Browse files
committedJul 14, 2015
Update afterRender method definition, with v2.0.0
[skip ci]
1 parent 3cb3956 commit e354c9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ var redis = require("redis"),
115115

116116
prerender.set('beforeRender', function(req, done) {
117117
client.get(req.url, done);
118-
}).set('afterRender', function(req, prerender_res) {
118+
}).set('afterRender', function(err, req, prerender_res) {
119119
client.set(req.url, prerender_res.body)
120120
});
121121
```
@@ -132,7 +132,7 @@ prerender.set('beforeRender', function(req, done) {
132132
if (err) return done(err);
133133
done(err, {body: fields[0], status: fields[1]});
134134
});
135-
}).set('afterRender', function(req, prerender_res) {
135+
}).set('afterRender', function(err, req, prerender_res) {
136136
// Don't cache responses that might be temporary like 500 or 504.
137137
if (cacheableStatusCodes[prerender_res.statusCode]) {
138138
client.hmset(req.url, 'body', prerender_res.body, 'status', prerender_res.statusCode);

0 commit comments

Comments
 (0)
Please sign in to comment.