Skip to content

Commit 380083a

Browse files
feat: increase cache time for next.js demos
1 parent 9ee2d93 commit 380083a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

examples/full/pages/[pageId].tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ export const getStaticProps = async (context: any) => {
1919
props: {
2020
recordMap
2121
},
22-
revalidate: 10
22+
// cache for 60 minutes
23+
// NOTE: you'll likely want to use a shorter cache time for your app, but
24+
// I'm bumping this up because my vercel bill keeps increasing due to people
25+
// abusing the demo to host their own sites.
26+
revalidate: 60 * 60
2327
}
2428
}
2529

examples/minimal/pages/[pageId].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const getStaticProps = async (context: any) => {
1212
props: {
1313
recordMap
1414
},
15-
revalidate: 10
15+
revalidate: 60 * 60 // cache for 60 minutes
1616
}
1717
}
1818

0 commit comments

Comments
 (0)