traeak commented on code in PR #13611:
URL: https://github.com/apache/trafficserver/pull/13611#discussion_r4010215508
##########
include/proxy/http/HttpSM.h:
##########
@@ -182,6 +179,22 @@ enum class CompatibilityCacheLookup {
COMPAT_CACHE_LAST,
};
+/// Whether this lookup addresses the cache with the previous (9.2) key.
+inline bool
+should_use_compatibility_cache_key(CompatibilityCacheLookup lookup)
+{
+ return lookup == CompatibilityCacheLookup::COMPAT_CACHE_LOOKUP_92;
+}
+
+/// The object info to hand to a cache write, which a compatibility read must
not
+/// carry: it belongs to the legacy key and would turn the write into an update
+/// of a vector the canonical key does not have.
+inline CacheHTTPInfo *
+cache_write_info_for_lookup(CompatibilityCacheLookup lookup, CacheHTTPInfo
*object_read_info)
+{
+ return should_use_compatibility_cache_key(lookup) ? nullptr :
object_read_info;
+}
Review Comment:
change addressed
--
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]