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

Use Revalidation for Fetch #54

Merged
merged 1 commit into from
Oct 5, 2024
Merged

Use Revalidation for Fetch #54

merged 1 commit into from
Oct 5, 2024

Conversation

clementinelove
Copy link
Collaborator

Close #53

This PR try to use auto revalidation (revalidate after maximum 60s), but I need backend developer to help me check whether the automatic revalidation is working (use vercel preview link should work). Try update content in one of the article and then wait for at most 60s, the content should be refreshed. If not, we probably have to use { cache: "no-store" } for now, please let me know about this.

At the moment Next.js will cache all the fetch results, which is not what we wanted. We can either add `{ cache: "no-store" }` to completely disable cache or use the revalidate option to reduce API calls.
@clementinelove clementinelove added the bug Something isn't working label Oct 4, 2024
@clementinelove clementinelove requested a review from JElgar October 4, 2024 00:35
@clementinelove clementinelove self-assigned this Oct 4, 2024
Copy link

vercel bot commented Oct 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
now-u-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 4, 2024 0:35am

@clementinelove clementinelove marked this pull request as ready for review October 4, 2024 00:35
@JElgar JElgar merged commit d7116ab into dev Oct 5, 2024
3 checks passed
@JElgar JElgar deleted the fix/remove-api-cache branch October 5, 2024 11:23
@clementinelove clementinelove restored the fix/remove-api-cache branch October 5, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Next.js is Using Cache For All Fetch Requests All the Time
2 participants