Unable to cache data with `prefetchQuery` on server + `useQuery` in client
Test-case: https://stackblitz.com/edit/stackblitz-starters-skmfha?file=app%2Fform%2Fposts.tsx
Each time ./posts gets refreshed, the terminal prints "in getPosts" which is a message sent by the getPosts() function. I was under the assumption that getPosts() function will only be called again once the cached data expired, but it seems to be called every time the page gets refresh.
Is this the expected behaviour or am I doing something wrong?
Each time ./posts gets refreshed, the terminal prints "in getPosts" which is a message sent by the getPosts() function. I was under the assumption that getPosts() function will only be called again once the cached data expired, but it seems to be called every time the page gets refresh.
Is this the expected behaviour or am I doing something wrong?