Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291765

Cacheable breadcrumbs block, and fix breadcrumb builders

$
0
0

One of the last blocks that needs to become cachable is SystemBreadcrumbBlock.

Updated: Comment #0

Problem/Motivation

The breadcrumbs block is currently not cacheable at all.

Proposed resolution

Cache breadcrumbs on a per-URL, per-role, per-language basis. This, combined with the fact that proper cache tags should be set by the used breadcrumb builder (BreadcrumbBuilderInterface::build()), would ensure that we can cache the breadcrumb block forever, since any change that could affect the breadcrumbs to be rendered would invalidate the corresponding render cache entries.

Unfortunately, all of the breadcrumb classes don't even comply with the interface they're implementing: they're returning an array of rendered links, not a render array! Therefore, it is currently impossible to set cache tags!

Remaining tasks

Allow breadcrumb builders to bubble up cache tags.

User interface changes

None.

API changes

None.


Viewing all articles
Browse latest Browse all 291765

Trending Articles