tRPC Procedure based cache
Is there a way to set the cache request length depending on the procedure instead of a global amount? I can't seem to figure it out.
6 Replies
cachetime is one of they keys you can pass to opts
in usequery
Sorry, I meant cache server side, that is just for the client right?
oh
Response Caching | tRPC
The below examples uses Vercel's edge caching to serve data to your users as fast as possible.
i dont know if its possible inside the route
but the responseMeta here should give you what you need
not sure if there's a cleaner way of doing it, maybe ask on the trpc discord
I'll try both that and asking on discord, thanks a bunch :D