Skip to content

Synthesize shell cache spans from RDC enumeration #24297

Open

Description

@s1gr1d

Example:

export default function Page() {
  return (<><CachedHeader />  {/* 'use cache', baked into the static shell */}
    <Suspense fallback={<Sk/>}><LiveStock /></Suspense></>);
}

A request serves the shell, including the cached header, from the Resume Data Cache before any of our code runs. The handler instrumentation never fires. The trace shows LiveStock and nothing about the cached half of the page.

Already covered (#25318): when the server prerenders a shell again at runtime, the pageload gets page.server_rendering.type: partially_static and a cache_origin link to that prerender (if it was sampled). The prerender trace has the cache.put spans of the shell.

Solves: "was my cached content used, and how old was it?" for shell-served entries.

Fix idea: from code in the dynamic hole (the server-component wrapper), read the request work-unit store's resumeDataCache, enumerate its entries, and emit synthetic cache.get spans with key digest and item age. Research verified that enumeration works and read interception does not. Pages without a dynamic hole stay invisible. Document that limit instead of fighting it.

Activity

  1. linear-code commented on Sep 10, 2026

    @linear-code
  2. added
    javascriptPull requests that update javascript code
    on Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    javascriptPull requests that update javascript code

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions