CACHE-13371: more cache knobs under request.cf object#6365
CACHE-13371: more cache knobs under request.cf object#6365
Conversation
There was a problem hiding this comment.
I'm Bonk, and I've done a quick review of your PR.
This PR adds cacheControl and several other cache-related fields to the request.cf object, gated behind the workerdExperimental flag, with mutual-exclusion validation and synthesis of cacheControl from cacheTtl/cacheMode.
Issues found (ranked by severity):
- [HIGH] Negative
cacheTtl(other than -1) produces an RFC-invalidmax-agevalue (e.g.,max-age=-5). - [MEDIUM] Non-integer
cacheTtl(e.g., 3.5) silently skipscacheControlsynthesis, breaking the dual-write contract. - [MEDIUM]
CacheMode::RELOADdoes not synthesize anycacheControlvalue — downstream consumers migrating tocacheControlwon't see the bypass intent. - [LOW] Synthesis tests only verify request construction, not the actual serialized
cacheControloutput. - [LOW] Copyright year says 2025, should be 2026.
This review was generated by an AI assistant and may contain inaccuracies. Please verify all suggestions before applying.
|
Review posted on PR #6365 with 5 findings:
The feature gating behind |
Merging this PR will improve performance by 13%
Performance Changes
Comparing Footnotes
|
Supersedes #6300.