#noStore() bug?

6 messages · Page 1 of 1 (latest)

warm loom
#

I am learning next.js through the dashboard-project https://nextjs.org/learn/dashboard-app/static-and-dynamic-rendering, on chapter eight I added the noStore() function to the fetchRevenue() function, and I noticed that when I refresh the http://localhost:3000/dashboard page, and click into the invoices then click back Home which is the /dashboard url, it does not trigger the data fetching, however if I wait for like 3 minutes and click into invoices and click back in Home, it starts to fetch the data everytime I click back into the Home which is /dashboard, is this a feature of noStore()? my code is exactly same with the example code.

small shardBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

unreal hawk
#

Not 100% but I think the explanation here is that noStore() affects server side cache, what you're running into has to do with client side cache. If it was server side it also wouldn't refetch when you refresh the page, which as I understand does happen for you right now

#

I think in the lastest Canary version they added an option to set the stale time of client side cache in your Nextconfig

wanton chasm
#

Later in the course they will also teach you how to properly invalidate the router cache after mutations with server actions