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
Bug: on-demand revalidation showing one step old stale data #131
Comments
Are you able to reproduce this bug? @stipsan |
The revalidate function isn't designed to be used with |
Tried with both true & false. But same result. |
If you can share a link to the repo I could give it a look? |
Sure. here it is: https://github.com/surjithctly/jamstack-starter |
Thnx, I'm on the go right now and couldn't see anything out of the ordinary when browsing your code saw. Back home I'll investigate on my laptop and see what's going on |
Thank you, I even tried adding a delay of 5 seconds in |
Damn! just realized I still had useCdn true for frontend, false was only applied for revalidate. 🤦♂️ It does seems to work now. ✅ Thanks a lot for the help. You may close this issue. |
Great to hear you figured it out @surjithctly! 😌 There's some more information on how the revalidation works in this thread: #97 (comment) |
I'm using the
api/revalidate
to update content. But each time it updates, it returns one step old data. Not fresh.I'm tried using both
useCdn:
true & false, but same result. Here, the webhook fires immediately after publishing, but apicdn takes upto 60 sec to update the content. Thus Next.js getting old data each time.See below video.
Video transcription:
Starts next production builds
change “first post” to “Our first post”
Simulate “webhook” requests
Data do not change
[next attempt]
change “Our first post” to “Next first post”
Data change to Stale “Our First post” this time
but new data is “Next First Post” (edited)
CleanShot.2022-12-12.at.20.07.48-converted.mp4
The text was updated successfully, but these errors were encountered: