Open
Description
Overview
One of the best features of Next.js is incremental static regeneration. It would be great to have something similar to it.
https://nextjs.org/docs/basic-features/data-fetching#incremental-static-regeneration
The core features being:
- Pages can be dynamically generated
- Resulting page is cached for X time
- After X time, the page is dynamically regenerated again
In the ideal world, there would also be some way to invalidate the cache. vercel/next.js#16488
As I understand Sveltekit, currently, this is not possible.
Proposed solution
Extend the prerender API with a revalidate parameter.
<script context="module">
export const prerender = true;
export const revalidate = 900; // 900 seconds, or 15 minutes
</script>