Skip to content

feat(routing): add page.routeFromCache / context.routeFromCache#41685

Closed
pavelfeldman wants to merge 1 commit into
microsoft:mainfrom
pavelfeldman:route-from-cache
Closed

feat(routing): add page.routeFromCache / context.routeFromCache#41685
pavelfeldman wants to merge 1 commit into
microsoft:mainfrom
pavelfeldman:route-from-cache

Conversation

@pavelfeldman

@pavelfeldman pavelfeldman commented Jul 7, 2026

Copy link
Copy Markdown
Member

Fixes: #22865

Summary

  • Adds page.routeFromCache({ dir, match }) and context.routeFromCache({ dir, match }) — record matching GET responses to disk on the first run and replay them (no network) on subsequent runs. Returns a Disposable to stop caching.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Record matching GET responses to disk and replay them on later runs, with
an efficient on-disk format (append-only NDJSON index, inlined small bodies,
content-addressed blobs for large ones). Caching runs server-side so response
bodies never cross the client/server boundary.
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

7709 passed, 1235 skipped


Merge workflow run.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

11 flaky ⚠️ [chromium-library] › library/chromium/chromium.spec.ts:434 › should produce network events, routing, and annotations for Service Worker (advanced) `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:717 › screencast › should work with video+trace `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:717 › screencast › should work with video+trace `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:476 › screencast › should capture static page in persistent context @smoke `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/browsercontext-page-event.spec.ts:173 › should work with Ctrl-clicking `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/screenshot.spec.ts:213 › page screenshot › should not hang when event loop is blocked `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/video.spec.ts:275 › screencast › should capture navigation `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/video.spec.ts:645 › screencast › should capture full viewport `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/chromium/chromium.spec.ts:434 › should produce network events, routing, and annotations for Service Worker (advanced) `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-library] › library/chromium/chromium.spec.ts:434 › should produce network events, routing, and annotations for Service Worker (advanced) `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-library] › library/inspector/cli-codegen-3.spec.ts:224 › cli codegen › should generate frame locators (4) `@firefox-ubuntu-22.04-node20`

49603 passed, 1164 skipped


Merge workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]is it possible to reuse static resouces cache of previous test run ?

1 participant