diff -u b/core/modules/outside_in/outside_in.install b/core/modules/outside_in/outside_in.install --- b/core/modules/outside_in/outside_in.install +++ b/core/modules/outside_in/outside_in.install @@ -13,17 +13,12 @@ function outside_in_install() { - // Flush all persistent caches. - \Drupal::moduleHandler()->invokeAll('cache_flush'); - foreach (Cache::getBins() as $service_id => $cache_backend) { - $cache_backend->deleteAll(); - } + // This module affects the rendering of blocks and of the page. + // @todo Remove in https://www.drupal.org/node/2783791. + Cache::invalidateTags(['rendered']); - // Add the "use outside-in" permission to all those with "administer block". - $roles = \Drupal::entityTypeManager()->getStorage('user_role')->loadMultiple(); - /** @var \Drupal\user\RoleInterface[] $roles */ - foreach ($roles as $role) { - if ($role->hasPermission('administer block')) { - $role->grantPermission('use outside-in'); - $role->trustData()->save(); - } - } + // \Drupal\Core\Menu\ContextualLinkManager caches per-group definitions + // without associating the cache tag that would allow them to be cleared + // by its clearCachedDefinitions() implementation that is automatically + // invoked when modules are installed. + // @todo Remove when that is fixed in https://www.drupal.org/node/2773591. + \Drupal::service('cache.discovery')->deleteAll(); } reverted: --- b/core/modules/outside_in/outside_in.permissions.yml +++ /dev/null @@ -1 +0,0 @@ -use outside-in: 'Use Outside-In'