Skip to content

Commit 61fd238

Browse files
committed
Add option/note for disableServerCache
1 parent 9f64f90 commit 61fd238

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

handler.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,20 @@ const resetPrerenderCloud = () => {
5454
// all of the JavaScript will be gone
5555
// prerendercloud.set("removeScriptTags", true);
5656

57-
// 7. see all configuration options here: https://github.com/sanfrancesco/prerendercloud-nodejs
57+
// 7. disableServerCache
58+
// Disable the cache on prerender.cloud (default is enabled with 5 minute duration).
59+
// It probably makes sense to disable the prerender.cloud server cache
60+
// since CloudFront is caching things for you.
61+
// Pros/Cons of disabling prerender.cloud server cache:
62+
// Pros
63+
// - when you invalidate CloudFront, the next page load will be guaranteed fresh
64+
// Cons
65+
// - when you invalid CloudFront each page load will require a new prerender call
66+
// (so if you regularly invalidate even if the content hasn't changed, you're slowing
67+
// things down unnecessarily)
68+
// prerendercloud.set('disableServerCache', true);
69+
70+
// 8. see all configuration options here: https://github.com/sanfrancesco/prerendercloud-nodejs
5871

5972
// for tests
6073
if (prerenderCloudOption) prerenderCloudOption(prerendercloud);

0 commit comments

Comments
 (0)