Vercel function invocations

I have some questions regarding vercel server function invocations.

  1. When calling server actions in server components, does this count as a function invocation?
  2. When calling the nextjs fetch method to an external api, does this count as a function invocation?
  3. When calling the nextjs fetch method but it's a cache hit, does this count as a function invocation?
  4. How can I minimise function invocations when the requests are made on the client and can't be made on the server because they're far down the component tree? I'm currently using react-query cache however any hard refresh and the cache is gone, meaning users can spam reload costing us a bunch of function invocations
Was this page helpful?