Not fetching latest data
Answered
KenTay posted this in #help-forum
![Avatar](https://cdn.discordapp.com/avatars/518760779508350985/5dbda64e07b0096c3cb3a31090f4051f.webp?size=256)
KenTayOP
Hey, I'm using mongoose and Next js. I have two pages for a character both are server components. In the first one I fetch builds (with cache : no-store) and when I click on one build I go to the second page where it fetch this particular build and I can update it. When I update one build, upon validation I redirect to the "all builds" page but datas are not updated so it shows old datas. And when I click back to particular build page it still old datas while in my mongo DB datas are updated. I have to refresh manually to have datas updated and I don't know why.
Can someone help me pls ?
Here are my fetch functions :
Can someone help me pls ?
Here are my fetch functions :
![Image](https://cdn.discordapp.com/attachments/1141446297627414538/1141446297790971975/image.png)
![Image](https://cdn.discordapp.com/attachments/1141446297627414538/1141446298046828656/image.png)
9 Replies
![Avatar](https://cdn.discordapp.com/avatars/518760779508350985/5dbda64e07b0096c3cb3a31090f4051f.webp?size=256)
KenTayOP
I explained it so bad I feel but I'll precise if u ask
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
European sprat
Answer
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
European sprat
you're experiencing "router cache" or "client cache", that link has a breakdown of the various scenarios and what you can do
![Avatar](https://cdn.discordapp.com/avatars/518760779508350985/5dbda64e07b0096c3cb3a31090f4051f.webp?size=256)
KenTayOP
Okay thank you I'll take a look
![Avatar](https://cdn.discordapp.com/avatars/518760779508350985/5dbda64e07b0096c3cb3a31090f4051f.webp?size=256)
KenTayOP
I looked over it but it doesn't seem to be my problem. I noticed that upon refresh, the fetch function is called right. But when I navigate out and back to the page, the fetch won't execute at all.
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
European sprat
That's exactly what is discussed in that link
![Avatar](https://cdn.discordapp.com/avatars/518760779508350985/5dbda64e07b0096c3cb3a31090f4051f.webp?size=256)
KenTayOP
Okay so I struggle to understand everything
I can't figure out how to solve my issue base on this
![Avatar](https://cdn.discordapp.com/avatars/518760779508350985/5dbda64e07b0096c3cb3a31090f4051f.webp?size=256)
KenTayOP
Okay I finally understood and made it work, thank you !