Problem
Two inconsistencies when a handler sets both passage_cache_ttl and passage_streaming:
cacheManager->put() reads $response->body(), which buffers the stream before buildStreamedResponse() reads from the same PSR-7 body.
- A cache hit runs the
getResponse() hook while the live streaming path skips the hook by design, so behavior differs between hit and miss.
Location
src/Http/Controllers/PassageController.php:110-143
Fix
Either make the two options mutually exclusive (throw at request time), or skip cache writes for streamed responses and skip the hook on cached streaming hits. Document the chosen rule.
Sizing
Priority 20 (Impact 2, Risk 3, Effort 2). Estimated half a day.
From the tech debt audit dated 2026-07-05.
Problem
Two inconsistencies when a handler sets both
passage_cache_ttlandpassage_streaming:cacheManager->put()reads$response->body(), which buffers the stream beforebuildStreamedResponse()reads from the same PSR-7 body.getResponse()hook while the live streaming path skips the hook by design, so behavior differs between hit and miss.Location
src/Http/Controllers/PassageController.php:110-143Fix
Either make the two options mutually exclusive (throw at request time), or skip cache writes for streamed responses and skip the hook on cached streaming hits. Document the chosen rule.
Sizing
Priority 20 (Impact 2, Risk 3, Effort 2). Estimated half a day.
From the tech debt audit dated 2026-07-05.