Caching somehow now working
Answered
Eurasian Blackbird posted this in #help-forum
Eurasian BlackbirdOP
Hello, it's probably just me that don't understand correctly how this thing works, but i'm trying to have some of my content being cached on the server. Here is how things are organized :
I have a layout that had direct children fetching data on db (with 3rd party library). The props children (IE only the page in my case) is a dynamic route because it's using searchparams props.
I want the data that is fetched on the direct children of the layout to be cached (for some time), but I can't manage to achieve it. I've tried using the cache function from react but it's not working :/
Thanks for everyone who will try to help me 😄
I have a layout that had direct children fetching data on db (with 3rd party library). The props children (IE only the page in my case) is a dynamic route because it's using searchparams props.
I want the data that is fetched on the direct children of the layout to be cached (for some time), but I can't manage to achieve it. I've tried using the cache function from react but it's not working :/
Thanks for everyone who will try to help me 😄
7 Replies
Cache from react is to memoize the data
Not cache it (
)
)Since you are using a 3rd party service and not fetch
Use unstable cache
Answer
@Eurasian Blackbird
Eurasian BlackbirdOP
thank you