diff --git a/core/lib/Drupal/Core/Template/TwigEnvironment.php b/core/lib/Drupal/Core/Template/TwigEnvironment.php index 9758cc9..f268c41 100644 --- a/core/lib/Drupal/Core/Template/TwigEnvironment.php +++ b/core/lib/Drupal/Core/Template/TwigEnvironment.php @@ -135,7 +135,7 @@ public function getCacheFilename($name) { // Just check the list of loaded extensions once. if (!isset($this->templateCacheFilenamePrefix)) { - $this->templateCacheFilenamePrefix = hash('crc32b', $this->twigExtensionHash . \Drupal::VERSION . Settings::get('deployment_identifier')); + $this->templateCacheFilenamePrefix = hash('crc32b', $this->twigExtensionHash); } // The first part is what is invalidated. diff --git a/core/modules/system/src/Tests/Theme/TwigEnvironmentTest.php b/core/modules/system/src/Tests/Theme/TwigEnvironmentTest.php index ecf38b1..e6e5988 100644 --- a/core/modules/system/src/Tests/Theme/TwigEnvironmentTest.php +++ b/core/modules/system/src/Tests/Theme/TwigEnvironmentTest.php @@ -100,16 +100,7 @@ public function testCacheFilename() { $new_extension_filename = $environment->getCacheFilename('core/modules/system/templates/container.html.twig'); \Drupal::getContainer()->set('twig', NULL); - // Change the deployment identifier. - $settings = Settings::getAll(); - $settings['deployment_identifier'] = '7297'; - new Settings($settings); - - $environment = \Drupal::service('twig'); - $deyploment_identifier_change_filename = $environment->getCacheFilename('core/modules/system/templates/container.html.twig'); - $this->assertNotEqual($new_extension_filename, $original_filename); - $this->assertNotEqual($deyploment_identifier_change_filename, $original_filename); } }