Problem/Motivation
The inbox page (/orchestra/inbox) is never cached. For every operator, on every visit, the Dynamic Page Cache answers UNCACHEABLE (poor cacheability), and the work-item query, the row building and the rest of the page are all redone.
The reason is that InboxController::buildInbox() returns the task table as the page's main content, with the user cache context on it. That context is correct, because the list is the viewer's own work. But user is one of the high-cardinality contexts in renderer.config.auto_placeholder_conditions, so the context bubbles up to the response and the Dynamic Page Cache refuses the whole page. The table also has no #cache keys, so the render cache does not store it either.
Proposed resolution
Build the table in a lazy builder that is always placeholdered, with its own #cache keys:
- The page shell no longer varies per user, so the Dynamic Page Cache can store it once for everyone with the same permissions.
- The table is render-cached per user, tenant and URL. It keeps the tags and max-age it declares today.
- Every action link carries the request URI as its return target, so the placeholder also varies by
url. Without that, a cached table would send an operator back to another page or filter after completing a task.
Remaining tasks
- MR with a test asserting that the inbox page gets a Dynamic Page Cache HIT, and that a second operator still sees only their own tasks.
User interface changes
None.
API changes
None. The controller gains a buildTable() lazy builder, which core instantiates through create(); no new service.
Data model changes
None.
AI-Generated: Yes (Claude Code was used to help draft this issue summary and to write the fix and its test. I reviewed both.)
Issue fork orchestra-3628886
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 #3
mably commentedComment #4
mably commentedComment #6
mably commented