diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php
index 441b2398f4..732c4df219 100644
--- a/core/modules/simpletest/src/WebTestBase.php
+++ b/core/modules/simpletest/src/WebTestBase.php
@@ -509,6 +509,8 @@ protected function tearDown() {
     $this->curlClose();
     $this->curlCookies = [];
     $this->cookies = [];
+
+    apcu_clear_cache();
   }
 
   /**
diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php
index 93df3dbf13..17aed6d7f4 100644
--- a/core/tests/Drupal/Tests/BrowserTestBase.php
+++ b/core/tests/Drupal/Tests/BrowserTestBase.php
@@ -558,6 +558,7 @@ protected function tearDown() {
       $this->mink->stopSessions();
     }
 
+    apcu_clear_cache();
     // Restore original shutdown callbacks.
     if (function_exists('drupal_register_shutdown_function')) {
       $callbacks = &drupal_register_shutdown_function();
