Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isr - revalidation for stale data #478

Merged
merged 10 commits into from
Oct 16, 2023
Merged

Isr - revalidation for stale data #478

merged 10 commits into from
Oct 16, 2023

Conversation

DarrenBaldwin07
Copy link
Contributor

@DarrenBaldwin07 DarrenBaldwin07 commented Oct 10, 2023

  • Enables Incremental static regeneration on 10 second intervals
  • Nextjs will now try to regenerate static data after 10 seconds after the first request - if the page generation fails, it will fallback to the old data and try again later
  • The main benefit of adding this is that pgt.dev will now not need site re-builds for when extensions and extension meta data changes. We also do not lose any SEO + perf benefits of SSG because HTML is still being generated at build time (its just being regenerated when data is potentially stale)
  • This PR also removes the /api/regenerate route because it was not working in production due to Amplify not supporting on-demand revalidation

@aws-amplify-us-east-1
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-478.dwcnpr7p8u1tw.amplifyapp.com

@DarrenBaldwin07 DarrenBaldwin07 marked this pull request as ready for review October 15, 2023 00:35
@DarrenBaldwin07 DarrenBaldwin07 changed the title Isr revalidation Isr - revalidation for stale data Oct 16, 2023
Copy link
Contributor

@ianstanton ianstanton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🎉 Looks like CI wants us to bump the CLI crate because we modified its .gitignore. We can either bump that or tweak the CI to ignore changes to this file.

@DarrenBaldwin07 DarrenBaldwin07 merged commit c9ef857 into main Oct 16, 2023
@DarrenBaldwin07 DarrenBaldwin07 deleted the isr-revalidation branch October 16, 2023 16:56
sjmiller609 added a commit that referenced this pull request Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants