Copilot commented on code in PR #13611:
URL: https://github.com/apache/trafficserver/pull/13611#discussion_r3907490496


##########
src/proxy/http/HttpSM.cc:
##########
@@ -5339,8 +5353,13 @@ HttpSM::do_cache_delete_all_alts()
   SMDbg(dbg_ctl_http_seq, "Issuing cache delete for %s", 
t_state.cache_info.lookup_url->string_get_ref());
 
   HttpCacheKey key;
-  Cache::generate_key(&key, t_state.cache_info.lookup_url, 
t_state.txn_conf->cache_ignore_query,
-                      t_state.txn_conf->cache_generation_number);
+  if (should_invalidate_compatibility_cache()) {
+    Cache::generate_key92(&key, t_state.cache_info.lookup_url, 
t_state.txn_conf->cache_ignore_query,
+                          t_state.txn_conf->cache_generation_number);
+  } else {
+    Cache::generate_key(&key, t_state.cache_info.lookup_url, 
t_state.txn_conf->cache_ignore_query,
+                        t_state.txn_conf->cache_generation_number);
+  }

Review Comment:
   `do_cache_delete_all_alts()` chooses the cache key to delete based on a 304 
server response. For compatibility-key cache hits (e.g. purge/delete flows 
after a legacy-key hit), `compatibility_cache_lookup` can be 
`COMPAT_CACHE_LOOKUP_92` even when the server response is not 304, and this 
code will generate the canonical key and fail to delete the legacy object. That 
can leave the legacy object present and still serveable via compatibility 
lookup.



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