Skip to content

[Discussion] How caching works with RSC components #494

@carloshenryck

Description

@carloshenryck

Even though I've read the documentation and the breakdown, I'm still not fully sure how caching works with RSC components.

For example, in my current project, I'm building a paginated list that is rendered 100% server-side using RSC. When the page changes (e.g., /posts?page=2), a query is made using getClient().

My question is: when a user revisits the same paginated page, is the response cached?

  • Is it leveraging the built-in Next.js server-side cache?
  • If not, does Apollo implement its own caching layer for RSC?
  • Or do fetches inside RSC components bypass caching entirely?

And if there is no caching, would it be more performant to only fetch the first page on the server (with <PreloadQuery />) and handle the rest of the pagination on the client side?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions