diff --git a/core/lib/Drupal/Core/Hook/HookCollectorPass.php b/core/lib/Drupal/Core/Hook/HookCollectorPass.php
index a1d38544c22f0b1a6d60b29da2a37dc7e0503543..3d96ca99486fd355bfe131cbe7244323ed8823e1 100644
--- a/core/lib/Drupal/Core/Hook/HookCollectorPass.php
+++ b/core/lib/Drupal/Core/Hook/HookCollectorPass.php
@@ -6,11 +6,9 @@
 
 use Drupal\Component\Annotation\Doctrine\StaticReflectionParser;
 use Drupal\Component\Annotation\Reflection\MockFileFinder;
-use Drupal\Component\FileCache\FileCacheFactory;
 use Drupal\Core\Extension\ProceduralCall;
 use Drupal\Core\Hook\Attribute\Hook;
 use Drupal\Core\Hook\Attribute\LegacyHook;
-use Drupal\Core\Site\Settings;
 use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
 use Symfony\Component\DependencyInjection\ContainerBuilder;
 
@@ -158,11 +156,6 @@ public static function collectAllHookImplementations(array $module_filenames): s
    * @return void
    */
   protected function collectModuleHookImplementations($dir, $module, $module_preg): void {
-    // Add the deployment identifier to the cache namespace so that changes in
-    // the implementation of attribute parsing will not result in a stale
-    // cache.
-    $file_cache = FileCacheFactory::get('hook_implementations' . ':' . Settings::get('deployment_identifier'));
-
     $iterator = new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::UNIX_PATHS | \FilesystemIterator::FOLLOW_SYMLINKS);
     $iterator = new \RecursiveCallbackFilterIterator($iterator, static::filterIterator(...));
     $iterator = new \RecursiveIteratorIterator($iterator);
@@ -170,53 +163,32 @@ protected function collectModuleHookImplementations($dir, $module, $module_preg)
     foreach ($iterator as $fileinfo) {
       assert($fileinfo instanceof \SplFileInfo);
       $extension = $fileinfo->getExtension();
-      $filename = $fileinfo->getPathname();
-      $cached = $file_cache->get($filename);
-
       if ($extension === 'module' && !$iterator->getDepth()) {
         // There is an expectation for all modules to be loaded. However,
         // .module files are not supposed to be in subdirectories.
-        include_once $filename;
+        include_once $fileinfo->getPathname();
       }
       if ($extension === 'php') {
-        if ($cached) {
-          $class = $cached['class'];
-          $attributes = $cached['attributes'];
-        }
-        else {
-          $namespace = preg_replace('#^src/#', "Drupal/$module/", $iterator->getSubPath());
-          $class = $namespace . '/' . $fileinfo->getBasename('.php');
-          $class = str_replace('/', '\\', $class);
-          $attributes = static::getHookAttributesInClass($class);
-          $file_cache->set($filename, ['class' => $class, 'attributes' => $attributes]);
-        }
-        foreach ($attributes as $attribute) {
+        $namespace = preg_replace('#^src/#', "Drupal/$module/", $iterator->getSubPath());
+        $class = $namespace . '/' . $fileinfo->getBasename('.php');
+        $class = str_replace('/', '\\', $class);
+        foreach (static::getHookAttributesInClass($class) as $attribute) {
           $this->addFromAttribute($attribute, $class, $module);
         }
       }
       else {
-        if ($cached) {
-          $implementations = $cached;
-        }
-        else {
-          $finder = MockFileFinder::create($filename);
-          $parser = new StaticReflectionParser('', $finder);
-          $implementations = [];
-          foreach ($parser->getMethodAttributes() as $function => $attributes) {
-            if (!StaticReflectionParser::hasAttribute($attributes, LegacyHook::class) && preg_match($module_preg, $function, $matches)) {
-              $implementations[] = ['function' => $function, 'module' => $matches['module'], 'hook' => $matches['hook']];
-            }
+        $finder = MockFileFinder::create($fileinfo->getPathName());
+        $parser = new StaticReflectionParser('', $finder);
+        foreach ($parser->getMethodAttributes() as $function => $attributes) {
+          if (!StaticReflectionParser::hasAttribute($attributes, LegacyHook::class) && preg_match($module_preg, $function, $matches)) {
+            $this->addProceduralImplementation($fileinfo, $matches['hook'], $matches['module'], $matches['function']);
           }
-          $file_cache->set($filename, $implementations);
-        }
-        foreach ($implementations as $implementation) {
-          $this->addProceduralImplementation($fileinfo, $implementation['hook'], $implementation['module'], $implementation['function']);
         }
       }
       if ($extension === 'inc') {
         $parts = explode('.', $fileinfo->getFilename());
         if (count($parts) === 3 && $parts[0] === $module) {
-          $this->groupIncludes[$parts[1]][] = $filename;
+          $this->groupIncludes[$parts[1]][] = $fileinfo->getPathname();
         }
       }
     }