IssueRaiser

Add incremental static regeneration

<!-- If you'd like to propose an implementation for a large new feature or change then please create an RFC: https://github.com/sveltejs/rfcs --> ### 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. ```svelte <script context="module"> export const prerender = true; export const revalidate = 900; // 900 seconds, or 15 minutes </script> ```

Posted by Nick-Mazuk on Mar 25, 2021, 4:35 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,000 issues0 comments

github (Software)

Add incremental static regeneration

Nick-MazukMar 25, 2021, 4:35 AM

<!-- If you'd like to propose an implementation for a large new feature or change then please create an RFC: https://github.com/sveltejs/rfcs --> ### 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. ```svelte <script context="module"> export const prerender = true; export const revalidate = 900; // 900 seconds, or 15 minutes </script> ```

Comments (0)

No comments yet. Start the discussion.

Comment on this issue