masaori335 commented on code in PR #12735:
URL: https://github.com/apache/trafficserver/pull/12735#discussion_r2596689966


##########
include/proxy/http/HttpConfig.h:
##########
@@ -852,6 +856,72 @@ struct HttpConfigParams : public ConfigInfo {
   HttpConfigParams &operator=(const HttpConfigParams &) = delete;
 };
 
+/////////////////////////////////////////////////////////////
+//
+// class ParsedConfigCache
+//
+/////////////////////////////////////////////////////////////
+
+/** Cache for pre-parsed string config values.
+ *
+ * Some overridable STRING configs require parsing (e.g., status code lists,
+ * host resolution preferences). Parsing can be non-trivial. This cache stores
+ * parsed results so repeated calls to TSHttpTxnConfigStringSet() with the same
+ * value don't re-parse.
+ *
+ * The static lookup() method handles everything: check cache, parse if needed,
+ * store in cache, and return the result.
+ */
+class ParsedConfigCache
+{
+public:
+  /** Pre-parsed representations for configs that need special parsing. */
+  struct ParsedValue {

Review Comment:
   Kind of nit-picking, `union` or `std::variant` is better? Because we only 
use one of these members.



-- 
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]

Reply via email to