Problem/Motivation
The public interaction dispatcher (InteractionController::step()) renders whichever step the run is parked on at request time: a message, a payment page, a status. It returns those render arrays with no cache metadata, so the dynamic page cache (and the anonymous page cache) store the page keyed by its URL. When the run advances to the next step, the same dispatcher URL now resolves to a different step, but the cache replays the earlier render, so a visitor sees a stale step (for example "Awaiting confirmation" after a booking has already been confirmed) until caches are cleared.
The payment interaction hid this for its own page by stamping a zero max-age on its render, but message and status steps do not, so they go stale.
Proposed resolution
Stamp a zero max-age centrally on every array the dispatcher returns, so any parked step's page always reflects the live run state and is never served stale. A redirect (an interaction's off-site hand-off) manages its own cacheability.
Covered by a kernel test asserting the dispatched step response carries a zero max-age.
Remaining tasks
- Review.
Issue fork orchestra-3609153
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mably commentedPushed the fix to the issue fork branch
3609153-interaction-dispatcher-caches: InteractionController::step() now stamps a zero max-age on every array it returns, so the dispatcher never serves a stale step after the run advances. Added a kernel test asserting the dispatched step response is uncacheable.Verified on a live site: after a payment settles, the visitor page moves from the awaiting-confirmation step to the confirmed step without a cache clear.
Comment #5
mably commented