Skip to content

Wrap cache key generation in HttpSM helpers - #13706

Open
JakeChampion wants to merge 1 commit into
apache:masterfrom
JakeChampion:jake/ok
Open

JakeChampion wants to merge 1 commit into
apache:masterfrom
JakeChampion:jake/ok

Conversation

@JakeChampion

Copy link
Copy Markdown
Contributor

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.

supersedes #13557

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.
Copilot AI lite review requested due to automatic review settings September 18, 2026 14:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 JosiahWI added this to the 11.0.0 milestone Sep 18, 2026

@JosiahWI JosiahWI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants