diff --git a/core/lib/Drupal/Core/Template/TwigEnvironment.php b/core/lib/Drupal/Core/Template/TwigEnvironment.php index 64399bf..2deec5f 100644 --- a/core/lib/Drupal/Core/Template/TwigEnvironment.php +++ b/core/lib/Drupal/Core/Template/TwigEnvironment.php @@ -102,10 +102,7 @@ public function loadTemplate($name, $index = NULL) { $this->cache->write($key, $this->compileSource($this->getLoader()->getSource($name), $name)); } - if (!$this->cache->load($key)) { - $this->cache->write($key, $this->compileSource($this->getLoader()->getSource($name), $name)); - $this->cache->load($key); - } + $this->cache->load($key); if (!class_exists($cls, FALSE)) { $compiled_source = $this->compileSource($this->loader->getSource($name), $name);