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

Command icon 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

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review

Pushed 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.

  • mably committed 9f28e8e6 on 1.x
    fix: #3609153 Interaction dispatcher caches step pages, showing a stale...
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.