Skip to content

Add incremental static regeneration #661

Open
@Nick-Mazuk

Description

@Nick-Mazuk

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature / enhancementNew feature or requestsize:largesignificant feature with tricky design questions and multi-day implementation

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions