Skip to content

perf: cache explicit public responses before OpenNext execution - #8

Draft
ofershap wants to merge 2 commits into
mainfrom
perf/workers-http-cache
Draft

ofershap wants to merge 2 commits into
mainfrom
perf/workers-http-cache

Conversation

@ofershap

Copy link
Copy Markdown
Owner

Scope

Enable Workers HTTP caching before the existing OpenNext worker with a fail-closed response wrapper. No new TTLs, paid plan, billing, logs, IP blocks, or visual changes. Cross-version cache remains off.

Safety

Only allowlisted public GET/HEAD 200s with explicit positive shared TTL. Reject cookies/auth/set-cookie/private/no-cache/no-store/unknown routes/non-200s. Preserve Next HTML/RSC/prefetch variants, credentials and Host in Vary. The same 35 policy tests run during build.

Qualification

35 unit tests, source lint (8 preexisting warnings), Next/OpenNext builds pass. A bounded temporary preview tested current production public response bytes without copying a runtime credential: MISS/HIT, HTML/RSC/prefetch separation, HEAD, cookie/auth bypass, unknown 404, and Host separation passed. All preview Workers, bindings and preview DO namespaces deleted and verified. A standalone unauthenticated cold renderer receives GitHub403; that path is NOT claimed as qualified. This is repeat-load relief, not a promise of cold-render CPU compliance.

Release gate / rollback

Draft until request allowance assessment and final review pass. Font build reliability landed separately in #7. Rollback: revert this PR or restore the prior deployment with caching disabled; no data migration.

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.

1 participant