prerender/prerender-node — pull request #32 by frankiethekneeman (2014-07-17 15:55:03+00:00)
Title: Adding retry functionality.

When using this middleware with a custom server, we found the prerender server to be crashing non-deterministically. After lots of debugging, we decided that perhaps the best solution was one in which the middleware retried intelligently. To this end, we've added two (optional) parameters.

.set('retry', function(prerender_res) {
return false;
});

Retry is a function that takes the prerender response, and returns true if (and only if) the middle-ware ought to retry the request.

.set('retryLimit', 0);

retryLimit is a configuration variable which controls the number of total tries a request is allowed. Anything less than one is considered equivalent to one.

We wanted to commit back to the community, and make this middleware more usable by all involved. Please, let us know what we can do to get this merged into repo.