question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add incremental static regeneration

See original GitHub issue

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>

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:79
  • Comments:30 (13 by maintainers)

github_iconTop GitHub Comments

19reactions
benmccanncommented, Mar 26, 2021

If there aren’t many users then you also don’t need to worry about performance very much

15reactions
Conduitrycommented, Mar 25, 2021

This can essentially be done now by returning cache headers and having a proxy sitting in front of the Kit app that understands those cache headers. I’m not entirely convinced this needs its own implementation solely in Kit.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incremental Static Regeneration - Data Fetching - Next.js
Incremental Static Regeneration (ISR) works on self-hosted Next.js sites out of the box when you use next start . You can use this...
Read more >
Incremental Static Regeneration – Vercel Docs
Incremental Static Regeneration (ISR) allows you to create or update content without redeploying your site. ISR has three main benefits for developers: ...
Read more >
A Complete Guide To Incremental Static Regeneration (ISR ...
Incremental Static Regeneration (ISR) is a new evolution of the Jamstack, allowing you to update static content instantly without needing a ...
Read more >
Incremental Static Regeneration with Next.js - LogRocket Blog
Next.js v9.5 introduces Incremental Static Regeneration, a hybrid version of SSG and SSR, which can regenerate static pages during runtime.
Read more >
Incremental Static Regeneration: Building static sites a little at ...
Incremental Static Regeneration, or ISR, seeks to extend the power of static sites by adding some server-side rendering (SSR) goodies on top ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found