Problem/Motivation

DisplayExtender::preExecute() in Views and PageLayoutSource::getPropValue() call set() on the runtime theme registry on every render.
CacheCollector::set() invalidates the cached runtime registry at once, and updateCache() writes nothing back when the request resolved no new entry.
So a warm page leaves the cache invalid, the next page deletes it, and the one after rebuilds it from the full registry with its own entries only.
On a demo site, the front theme's runtime cache held 28 entries before an uncached Display Builder Views page, then was invalid, then gone, then held 11.
page_legacy is a copy of the page hook, kept only because the page variants used to swap page, which #3631914: Page variants save their page template in the theme registry cache removes.

Steps to reproduce

  1. Enable Display Builder on a Views page display, such as articles:page_1 at /article.
  2. Run drush cr, then open /article to warm the caches.
  3. Open /article?r=1, so the view renders again past the page caches.
  4. Read theme_registry:runtime:THEME in the bootstrap cache bin, THEME being the front theme: the item is invalid.

Proposed resolution

Stop writing to the runtime theme registry.
The Views template becomes a suggestion declared in hook_theme(), as in #3631914: Page variants save their page template in the theme registry cache, and the page_layout source renders the theme's page hook directly.

Remaining tasks

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

mogtofu33 created an issue. See original summary.

  • mogtofu33 committed 3f2a8233 on 1.0.x
    fix: #3631924 Views and the page_layout source invalidate the runtime...
mogtofu33’s picture

Assigned: mogtofu33 » Unassigned
Status: Active » 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.

pdureau’s picture

Status: Fixed » Closed (fixed)