tinacms / tina-cloud-starter

Next.js starter for TinaCMS: live edit your website visually 🪄
https://tina-cloud-starter-orcin.vercel.app/
Apache License 2.0
234 stars 376 forks source link

🐛 Fix Next.js Caching Issue with global Data Not Revalidating #556

Open JackDevAU opened 1 month ago

JackDevAU commented 1 month ago

CC: @wicksipedia @adamcogan @JeanThirion @sethdaily @Freego1783

Description

Next.js caching is not revalidating properly when the global data is updated in TinaCMS. Although the updates are successfully saved in the content files, the changes do not immediately appear on the site. Two temporary solutions have been identified:

  1. Using revalidatePath to force a page re-render:- https://github.com/tinacms/tina-cloud-starter/pull/555
  2. Disabling cache in the browser's network tab to bypass the issue.

A long-term fix is needed to ensure that content updates are reflected without requiring manual steps.

Acceptance Criteria

https://github.com/user-attachments/assets/83a828d1-5a77-4fea-9668-a5c0f3d913b2

Figure: Problem + "Disable cache" Fix