[billing] query cache hit counts towards billed function calls?
Sorin here. with 4 questions 😄
Question1: do cache hits on queries get counted in function calls?
Question2: do cache responses size gets reflected in any billed metric?
Context: I am asking this because a patern we are using in react is to work with caches in useQuery from tenstack query. One example: in a chat app, the name of the user for the chat messages is resolved with useQuery(["get-User", userId]...) in all the chat bubbles.
Moving to convex, I understand that the caching is done server side. so I assume each mount of each chat bubble is a query. Most would resolve from cache, but what about the billing? (Question 3)
The response decides the path we take next in regards to ditching ten stack query in favor of cached convex useQuery.
We are aware of the ten stack adapter, but I was evaluating if we can drop ten stack all toghether. But that one actually does client side caching and the network req goes only one time. is this changed with the helpers? (question 4)
I know it's a bit more then just a simple discord question, but I feel that this kind of behaviur can affect billing at scale. I din't find enything clear on docs or on official convex channels.
Thanks in advance!
4 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
🙄
Cached function responses only count as function calls: https://discord.com/channels/1019350475847499849/1221939343074132139/1222394450358304889
Thanks 🙏