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

Add CacheOptionalInterface to more blocks

$
0
0

Problem/Motivation

#2232375: Make language switcher block cacheable introduces support for blocks to implement said interface, in that issue just for the language switcher.

I think there are a number of blocks that could benefit from this as well, where we can safely assume that rendering them is faster than fetching it from the cache backend.

Essentially blocks that just render out straight markup, with minimal to no theming and no IO.

Such as \Drupal\system\Plugin\Block\SystemPoweredByBlock and \Drupal\system\Plugin\Block\SystemMessagesBlock probably as well.

This is similar to #2935804: Add cache context exclusion list to RenderCache::set() except it's not cache context based but more explicit.

Proposed resolution

Add the interface.

Remaining tasks

Figure out how to decide to which blocks we want to add it.

User interface changes

None.

API changes


Viewing all articles
Browse latest Browse all 294800

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>