Change record status: 
Project: 
Introduced in branch: 
11.2.x
Introduced in version: 
11.2.0
Description: 

A new ::createPlaceholder() method has been added to BlockPluginInterface:

 /**
   * Whether to render blocks in a placeholder.
   *
   * When blocks of this type are rendered, indicate whether they should be
   * rendered in a placeholder or not. In general, blocks that attach libraries
   * and/or render entities should be placeholdered to optimize various aspects
   * of rendering performance.
   *
   * @return bool
   *   Whether to placeholder blocks of this plugin type.
   */
  public function createPlaceholder(): bool;

Blocks are already placeholdered implicitly if they specify particular cache metadata. This new method allows blocks to specify that they should always be placeholdered regardless of cache metadata.

Several core block plugins have been set to placeholder.

This change should immediately enable higher cache rates for some dynamic page cache items, because high-invalidation cache tags may no longer be attached to the dynamic page cache entry and instead will only affect the individual placeholder. It also allows responses served by Drupal's big pipe module to handle more of the page with big pipe.

Impacts: 
Module developers