Add incremental static regeneration
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
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. https://github.com/vercel/next.js/discussions/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>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Next.js incremental static regeneration documentation and the SvelteKit RFC process, then inspect the existing prerender API. The work is done when prerendered pages can be regenerated after a configurable interval and the cache invalidation behavior is defined, implemented, and tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, next.js
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100