Cache with TRPC app router

Hi guys, I'm struggling implementing cache in my nextjs app. I'm using nextjs with TRPC and app router and it seems that both server and client calls to my TRPC routes are in "no-cache" mode. Have you got any good ressources to change that ? (relevant repository for example) I want some query to be cached and some not, and maybe implement a full router cached... If someone can help šŸ™‚
3 Replies
Fossil
Fossilā€¢2mo ago
Bump. Cannot find a way to have caching respected for trpc endpoints. create-t3-app@7.30.1 I'm able to set cache-control headers in the createCallerFactory context, or fetchRequestHandler's responseContext but it doesnt seem to have an impact Currently documented tRPC cacheing methods (https://trpc.io/docs/server/caching) won't work as they rely on setting headers which NextJs now overrides (https://nextjs.org/docs/app/api-reference/next-config-js/headers#cache-control)
v-for-v
v-for-vā€¢2mo ago
I just made a question about this
v-for-v
v-for-vā€¢2mo ago
Discord
Discord - A New Way to Chat with Friends & Communities
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.
Want results from more Discord servers?
Add your server
More Posts