Wrap cache key generation in HttpSM helpers - #13706
Open
JakeChampion wants to merge 1 commit into
Open
JakeChampion wants to merge 1 commit into
JakeChampion wants to merge 1 commit into
Conversation
Every cache key call site had to repeat the same two `txn_conf` arguments, which makes it easy for a new call site to pass a different `ignore_query` or generation number and silently compute a key that does not match the rest of the transaction. Funnel them through `generate_cache_key()`/`generate_ cache_key92()` instead.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved review issues remain.
Pull request overview
Centralizes HttpSM cache-key generation through transaction-aware helper methods.
Changes:
- Adds standard and ATS 9.2 cache-key helpers.
- Updates all cache-key call sites to use them.
File summaries
| File | Summary |
|---|---|
src/proxy/http/HttpSM.cc |
Implements helpers and replaces direct cache-key calls. |
include/proxy/http/HttpSM.h |
Declares the helper methods. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
JosiahWI
approved these changes
Sep 18, 2026
Contributor
There was a problem hiding this comment.
Change looks good. Idea: I think it could be even further improved by making these freestanding functions that also take txn_conf as a parameter. HttpSM is a very bloated class and we need to work on fixing that. Do look for opportunities to move code out of HttpSM such that the code left in HttpSM can be cohesive around a well defined set of responsibilities.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every cache key call site had to repeat the same two
txn_confarguments, which makes it easy for a new call site to pass a differentignore_queryor generation number and silently compute a key that does not match the rest of the transaction. Funnel them throughgenerate_cache_key()/generate_ cache_key92()instead.supersedes #13557