CACHE-13371: more cache knobs under request.cf object#6300
CACHE-13371: more cache knobs under request.cf object#6300yj7o5 wants to merge 1 commit intocloudflare:mainfrom
Conversation
cea6afc to
7d0e0f9
Compare
danlapid
left a comment
There was a problem hiding this comment.
Let's add new code behind an featureFlags.getWorkerdExperimental() check until we validated that it works as we want in prod, then we can delete the gate.
2bfbff4 to
ac4c657
Compare
ca0cc98 to
56c519b
Compare
| ( name = "CACHE_ENABLED", json = "false" ), | ||
| ], | ||
| compatibilityFlags = ["nodejs_compat", "service_binding_extra_handlers", "cache_option_disabled", "url_standard", "workers_api_getters_setters_on_prototype", "fetch_legacy_url", "web_socket_auto_reply_to_close"], | ||
| compatibilityFlags = ["nodejs_compat", "service_binding_extra_handlers", "cache_option_disabled", "url_standard", "workers_api_getters_setters_on_prototype", "fetch_legacy_url", "web_socket_auto_reply_to_close", "workerd_experimental"], |
There was a problem hiding this comment.
This shouldn't work, are you sure the tests are testing what you want?
It should need to be
| compatibilityFlags = ["nodejs_compat", "service_binding_extra_handlers", "cache_option_disabled", "url_standard", "workers_api_getters_setters_on_prototype", "fetch_legacy_url", "web_socket_auto_reply_to_close", "workerd_experimental"], | |
| compatibilityFlags = ["nodejs_compat", "service_binding_extra_handlers", "cache_option_disabled", "url_standard", "workers_api_getters_setters_on_prototype", "fetch_legacy_url", "web_socket_auto_reply_to_close", "experimental"], |
56c519b to
3096570
Compare
| } else { | ||
| obj.set(js, "cacheTtl", js.num(NOCACHE_TTL)); | ||
| v8::Local<v8::Value> ttlHandle = ttlVal; | ||
| auto ttl = jsg::check(ttlHandle->IntegerValue(js.v8Context())); |
There was a problem hiding this comment.
Do we need to check for negative numbers here? The comment on line 758 suggests a contract.
Merging this PR will degrade performance by 11.15%
Performance Changes
Comparing Footnotes
|
This PR adds new cache fields under the request cf object to allow more fine grained control to workers fetch API for caching assets.