Next.js Discord

Discord Forum

Next.js { cache: "no-store" } does not work

Unanswered
Miniature Fox Terrier posted this in #help-forum
Open in Discord
Miniature Fox TerrierOP
Hello,

I'm using Next.js version 13.4.12. I'm implementing an async fetch in my server-side page.jsx component and I'm telling it to fetch the data from the beginning every time it comes to the page. I've tried no-cache or next: { revalidate: 0 } properties for this. But this doesn't work and it keeps fetching data from the cache. The reason I want this is that items on the product page can be deleted or made inactive. Meanwhile the customer should not see this.

Is there a solution to this problem? I think next.js is still not working well. :blob_help:

9 Replies

how did you encounter the behavior? is it when you hard refresh the page or is it when you do a navigation in between pages?
Miniature Fox TerrierOP
@alfon If I refresh the page, there is no problem. But when I navigate between pages, the data does not change. This is very bad.
It is important that some data is not cached even on the server-side. Documentation does not work. I've tried everything.
its only client side so you shouldnt worry about it
Miniature Fox TerrierOP
Yeah, I guess you're right. After 30 seconds, when I enter the page, it brings up the new data.
but this is per client/tab only
Miniature Fox TerrierOP
Still, it shouldn't be so hard