Aias00 opened a new issue, #8012: URL: https://github.com/apache/shenyu/issues/8012
## Description Follow-up to the plugin orchestration review against master `34f2ed036` and design PR #8007 (`f2839049c`). Parent proposal: #7993. Owning implementation/design task: #7999. Related tasks: #7994, #7996, #8001. This issue refines the existing work breakdown; it does not assert that GRAPH execution is already implemented or that the proposed design has been accepted. HTTP/RPC API aggregation and parallel plugin execution remain out of scope. ## Problem Current cache keys combine request method/full raw URI and cache selector/rule IDs. They do not represent graph identity, selected branch, output-affecting request headers or graph output semantics. In GRAPH mode, two requests for the same URI may select different downstream paths but use the same cache rule. A cache before CHOICE can return the wrong path's response without evaluating that CHOICE. The recently added single-flight mechanism can also merge concurrent fills from different paths. This is a future GRAPH-mode compatibility hazard, not a claim that a graph runtime already exists. ## Code and design evidence - [dataKey and responseKey](https://github.com/apache/shenyu/blob/34f2ed036/shenyu-plugin/shenyu-plugin-cache/shenyu-plugin-cache-handler/src/main/java/org/apache/shenyu/plugin/cache/utils/CacheUtils.java) - [lookup, single-flight and cache fill](https://github.com/apache/shenyu/blob/34f2ed036/shenyu-plugin/shenyu-plugin-cache/shenyu-plugin-cache-handler/src/main/java/org/apache/shenyu/plugin/cache/CachePlugin.java) - [fill coordination](https://github.com/apache/shenyu/blob/34f2ed036/shenyu-plugin/shenyu-plugin-cache/shenyu-plugin-cache-handler/src/main/java/org/apache/shenyu/plugin/cache/cache/ResponseSingleFlight.java) ## Task List - Define an explicit cache-equivalence identity including all supported output-affecting routing dimensions, or reject unsupported cache/branch combinations. - Decide placement/identity derivation when CHOICE occurs after cache; a branch ID that is unknown before a hit is not sufficient. - Apply the same equivalence boundary to lookup, fill and single-flight follower keys. - Define whether graph publication changes cache identity and when equivalent revisions can share data. Handle distributed caches and mixed LEGACY/GRAPH deployment groups. - Keep cache + normal response-writer composition legal; do not solve this by misclassifying cache as an always-exclusive writer. ## Acceptance criteria - Same URI and cache rule with different Header-selected outputs never cross-hit or coalesce incorrectly. - Equivalent requests still share a fill when safe; incompatible revisions/deployments do not leak results. - Tests cover completed hits, concurrent misses/followers, cancellation, graph rollout and unsupported placement rejection. - Legacy cache-key compatibility and migration behavior are explicitly documented. ## Dependencies and sequencing Resolve the contract portion in #7994 / PR #8007 before depending implementation hardens this assumption. Deliver code and integration coverage under #7999 and the related tasks above. Existing issue dependencies remain in effect; this issue adds a focused review requirement rather than a duplicate full implementation task. -- 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]
