diff --git a/core/lib/Drupal/Component/FileCache/FileCache.php b/core/lib/Drupal/Component/FileCache/FileCache.php
index 761d490..1f26bbb 100644
--- a/core/lib/Drupal/Component/FileCache/FileCache.php
+++ b/core/lib/Drupal/Component/FileCache/FileCache.php
@@ -153,4 +153,11 @@ public function delete($filepath) {
     }
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public static function reset() {
+    static::$cached = [];
+  }
+
 }
diff --git a/core/lib/Drupal/Component/FileCache/FileCacheInterface.php b/core/lib/Drupal/Component/FileCache/FileCacheInterface.php
index e347783..b86cd13 100644
--- a/core/lib/Drupal/Component/FileCache/FileCacheInterface.php
+++ b/core/lib/Drupal/Component/FileCache/FileCacheInterface.php
@@ -61,4 +61,9 @@ public function set($filepath, $data);
    */
   public function delete($filepath);
 
+  /**
+   * Resets the static cache.
+   */
+  public static function reset();
+
 }
diff --git a/core/tests/Drupal/KernelTests/KernelTestBase.php b/core/tests/Drupal/KernelTests/KernelTestBase.php
index c560e25..54fba66 100644
--- a/core/tests/Drupal/KernelTests/KernelTestBase.php
+++ b/core/tests/Drupal/KernelTests/KernelTestBase.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\KernelTests;
 
+use Drupal\Component\FileCache\FileCacheFactory;
 use Drupal\Component\Utility\Html;
 use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Core\Config\ConfigImporter;
@@ -480,6 +481,32 @@ private function getCompiledContainerBuilder(array $modules) {
   }
 
   /**
+   * Initializes the FileCacheFactory component.
+   *
+   * We can not use the Settings object in a component, that's why we have to do
+   * it here instead of \Drupal\Component\FileCache\FileCacheFactory.
+   */
+  protected function initFileCache() {
+    $configuration = Settings::get('file_cache');
+
+    // Provide a default configuration, if not set.
+    if (!isset($configuration['default'])) {
+      $configuration['default'] = [
+        'class' => '\Drupal\Component\FileCache\FileCache',
+        'cache_backend_class' => NULL,
+        'cache_backend_configuration' => [],
+      ];
+      // @todo Use extension_loaded('apcu') for non-testbot
+      //  https://www.drupal.org/node/2447753.
+      if (function_exists('apc_fetch')) {
+        $configuration['default']['cache_backend_class'] = '\Drupal\Component\FileCache\ApcuFileCacheBackend';
+      }
+    }
+    FileCacheFactory::setConfiguration($configuration);
+    FileCacheFactory::setPrefix(Settings::getApcuPrefix('file_cache', $this->root));
+  }
+
+  /**
    * Returns Extension objects for $modules to enable.
    *
    * @param string[] $modules
@@ -495,6 +522,8 @@ private function getCompiledContainerBuilder(array $modules) {
    * @see \Drupal\Core\Extension\ModuleHandler::add()
    */
   private function getExtensionsForModules(array $modules) {
+    $this->initFileCache();
+
     $extensions = array();
     $discovery = new ExtensionDiscovery($this->root);
     $discovery->setProfileDirectories(array());
@@ -625,6 +654,9 @@ protected function tearDown() {
       }
     }
 
+    // Clean FileCache cache.
+    FileCacheFactory::reset();
+
     // Clean up statics, container, and settings.
     if (function_exists('drupal_static_reset')) {
       drupal_static_reset();
