shandy
Explore posts from serversDTDrizzle Team
•Created by shandy on 11/5/2024 in #help
Using drizzle postgres with trpc in Next.js app
I'm getting the following error with the below code:
Module not found: Can't resolve 'dns'
. For some reason, my Next.js app is trying to load drizzle
on the client where it doesn't have access to Node modules. Has anyone ever run into this before?
4 replies
Does `fetchRequestHandler()` automatically opt out of /app Route Handler caching?
I noticed that Next.js always skips cache for my TRPC API Route Handlers even though the request URLs are identical and the cache/revalidate config calls for persistent caching. I feel confident it has nothing to do with the
fetch()
calls within the Route Handlers as the same fetch()
calls are happening separately within SSR via createCaller()
and are being cached within Next's Data Cache as expected. However, I just read this from Route Handler docs:
You can opt out of caching by: Using the Request object with the GET method.And I see that
fetchRequestHandler()
takes in the Request
as a param:
Does fetchRequestHandler()
automatically opt out of /app Route Handler caching? And if so, is there a way to enable caching? Thanks in advance <:Sadge_pray:860473532700819506>2 replies