Theo's Typesafe CultTTC
Theo's Typesafe Cult2y ago
53 replies
v-for-v

Bug!? Server side calls are not being cached

The below is causing 2 API requests, one of the key patterns in the app router is to be able to call API functions wherever and have the response be cached across the entire request.

  async function Page(){
    await serverApi.user.me()

    return <ServerComponent />
  }

const async ServerComponent = () => {
    await serverApi.user.me()

    return null
}
Was this page helpful?