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
cje
cje3y ago
cachetime is one of they keys you can pass to opts in usequery
Vengeance
VengeanceOP3y ago
Sorry, I meant cache server side, that is just for the client right?
cje
cje3y ago
oh
cje
cje3y ago
Response Caching | tRPC
The below examples uses Vercel's edge caching to serve data to your users as fast as possible.
cje
cje3y ago
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
Vengeance
VengeanceOP3y ago
I'll try both that and asking on discord, thanks a bunch :D
Want results from more Discord servers?
Add your server