diff --git a/core/includes/common.inc b/core/includes/common.inc
index b9f2d8f..5961104 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -3924,8 +3924,8 @@ function drupal_flush_all_caches() {
   // Reset all static caches.
   drupal_static_reset();
 
-  // Clear all non-drupal_static() static caches.
-  \Drupal::entityManager()->clearCachedDefinitions();
+  // Clear all plugin caches.
+  \Drupal::service('plugin.cache_clearer')->clearCachedDefinitions();
 
   // Wipe the PHP Storage caches.
   PhpStorageFactory::get('service_container')->deleteAll();
