-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
Request is being cached despite passing next: { revalidate: 0 } #64956
Comments
We are also experiencing this, I have { next: { revalidate: 0 } } added to my fetch() requests but I still see fetch-cache being created with a very high revalidate value ( In my case the request is fetching a authorisation token from my auth provider, so I do not want that to be cached. This is giving allot of issues for our environment. |
I have fixed the issue by adding However, I feel that the above solution is still a workaround and not a robust solution. |
Yeah thats a workaround, could be a solution for some people but in our case we want to rely on the intended behaviour of the framework, and in this case its not working as documented. |
@abhishekmardiya in your reproduction you aren't setting We have numerous tests ensuring |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://github.com/abhishekmardiya/reproduction-app
To Reproduce
Current vs. Expected behavior
I have encountered an issue where the
getBlogList()
API is being cached even after passingnext: { revalidate: 0 }
in theOptionsType
object.To provide context, within my codebase, I am making two API calls:
getBlogList()
andgetSingleBlog()
. Despite explicitly settingnext: { revalidate: 0 }
in theOptionsType
object for thegetBlogList()
API call, the response is still being cached.I have two pages. One page displays a list of all blogs, and the other page shows the details of a single blog. I'm using getBlogList() to fetch the list of blogs for the blog list page, and getSingleBlog() to fetch the details for the detailed blog page.
whenever I add a new blog to my application, I have to manually purge out the cache from Vercel in order for the new blog to be visible to our users in blog list page.
Provide environment information
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
Vercel (Deployed)
Additional context
No response
The text was updated successfully, but these errors were encountered: