Closed Polynya closed 4 months ago
Add cache context for subsites, for example, so that blocks can be cached separately for the main website and a subsite:
/** * Implements hook_block_view_BASE_BLOCK_ID_alter(). */ function example_block_view_system_branding_block_alter(array &$build, BlockPluginInterface $block) { $build['#cache']['contexts'][] = 'subsites'; }
https://github.com/localgovdrupal/localgov_subsites_extras/pull/23
The attached PR is merged, so closing this issue.
Add cache context for subsites, for example, so that blocks can be cached separately for the main website and a subsite: