bneradt commented on code in PR #12735:
URL: https://github.com/apache/trafficserver/pull/12735#discussion_r2594163400
##########
src/api/InkAPI.cc:
##########
@@ -7527,23 +7536,22 @@ TSHttpTxnConfigStringSet(TSHttpTxn txnp,
TSOverridableConfigKey conf, const char
break;
case TS_CONFIG_HTTP_NEGATIVE_CACHING_LIST:
if (value && length > 0) {
- OverridableHttpConfigParams *target = &s->t_state.my_txn_conf();
- target->negative_caching_list.conf_value = const_cast<char *>(value);
- return _eval_conv(target, conf, value, length);
+ auto &parsed =
ParsedConfigCache::lookup(conf, std::string_view(value, length));
+ s->t_state.my_txn_conf().negative_caching_list = parsed.status_code_list;
Review Comment:
These `ParsedConfigCache::lookup` are the high level view of where the value
of this patch happens. Instead of calling the conversion logic for each of
these "complex" strings (like the negative caching status list, in this
example) every transaction, this parsed value retrieval is called through an
interface that caches the results so that the compution is only done once.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]