diff --git a/core/includes/common.inc b/core/includes/common.inc index b9f2d8f..26b640f 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -3924,9 +3924,6 @@ function drupal_flush_all_caches() { // Reset all static caches. drupal_static_reset(); - // Clear all non-drupal_static() static caches. - \Drupal::entityManager()->clearCachedDefinitions(); - // Wipe the PHP Storage caches. PhpStorageFactory::get('service_container')->deleteAll(); PhpStorageFactory::get('twig')->deleteAll(); @@ -3963,6 +3960,9 @@ function drupal_flush_all_caches() { // Rebuild all information based on new module data. $module_handler->invokeAll('rebuild'); + // Clear all plugin caches. + \Drupal::service('plugin.cache_clearer')->clearCachedDefinitions(); + // Rebuild the menu router based on all rebuilt data. // Important: This rebuild must happen last, so the menu router is guaranteed // to be based on up to date information.