Clarification NextJS Caching Revalidation
Hi! i have the function:
and I have the update function:
and the data on the page is not revalidatnig when I call the functions, I've tried revalidatePath, same issue. I know the function works because when I Crtl + Shift + R the data is correct. Any insights into why?
7 Replies
nextjs 15
and also the page is showing a static icon even tho the page is clearly dynamic
what am i missing?
i'm also router.refresh() ing and it doesn't work
same on build and dev
with and without turbopack
have you find out why? i'm having a similar problem
because giving unstable cache a key isn't the same as tagging it
you'd do something like that
it isn't intutive at all but I guess dynamic IO should fix that problem
it sill doesn't work for me, i eneded up exporting dynamic = "force-dynamic"
Hey this is prob because you're using
httpBatchStreamLink as your link in trpc, this won't work because the response is sent as soon as the request is received, and then the response body is streamed without the headers
httpBatchLink seems to be a good link for my app so I just changed over to it
https://trpc.io/docs/client/links
Links Overview | tRPC
Links enable you to customize the flow of data between the tRPC Client and Server. A link should do only one thing, which can be either a self-contained modification to a tRPC operation (query, mutation, or subscription) or a side-effect based on the operation (such as logging).
thank you very much for the response! but i ended up switching to tan stack start, it isn't perfect but i find it more explicit than next
awesome!