nextjs-demo
nextjs-demo copied to clipboard
Add Next.js revalidation so posts update correctly
It looks to me like the blog post wasn't getting correctly updated even after publishing & rebuilding, possibly due to the Next.js data cache.
All tests were done in new Incognito windows, with preview mode OFF.
Before
https://github.com/datocms/nextjs-demo/assets/11964962/9699903b-67a6-4267-b4fc-732a4c02ec47
After
Adding revalidate: 1 (in seconds) to our default fetchers seems to fix that for me.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated (UTC) |
|---|---|---|---|
| nextjs-demo | ✅ Ready (Inspect) | Visit Preview | Dec 19, 2023 11:01pm |