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

🦙Tina - Add ISR for content changes #3589

Open
Calinator444 opened this issue Feb 7, 2025 · 1 comment
Open

🦙Tina - Add ISR for content changes #3589

Calinator444 opened this issue Feb 7, 2025 · 1 comment

Comments

@Calinator444
Copy link
Member

Calinator444 commented Feb 7, 2025

CC: @wicksipedia, @miichaelsmedley

The Pain

Changes made using Tina cannot be previewed (outside of the Tina editor). Until the branch has been re-deployed. This can result in confusion.

Solution

We should investigate using ISR so that static routes using Tina are rebuilt when data is updated in Tina Cloud

Option 1: Use on-demand webhooks to invalidate the cache after saving

Note: Tina may not have webhook support yes, discuss this with Wicksy/someone from the Tina team
https://vercel.com/templates/next.js/on-demand-incremental-static-regeneration
https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration#on-demand-revalidation-with-revalidatepath

Option 2: Time based revalidation (not recommended)

https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration#time-based-revalidation

Image

Figure: outdated page being shown while staging branch rebuilds

@github-project-automation github-project-automation bot moved this to 🤷‍♂️ Needs Triage in SSW.Website Feb 7, 2025
@wicksipedia
Copy link
Member

Time based revalidation could be used as an interim measure. This is useful for content that doesn't update often.

For content that is revised more frequently - we are planning on adding webhook support to TinaCloud so that you can get a webhook when content is updated. This would include the list of files that changed, and the routes that changed (as based on the Tina config).

This used in conjunction with https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration#on-demand-revalidation-with-revalidatepath would allow you to use ISR effectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🤷‍♂️ Needs Triage
Development

No branches or pull requests

2 participants