diff --git a/core/lib/Drupal/Core/Template/TwigEnvironment.php b/core/lib/Drupal/Core/Template/TwigEnvironment.php index 2b7393b..a1abf84 100644 --- a/core/lib/Drupal/Core/Template/TwigEnvironment.php +++ b/core/lib/Drupal/Core/Template/TwigEnvironment.php @@ -38,7 +38,7 @@ class TwigEnvironment extends \Twig_Environment { protected $storage = NULL; /** - * The base template cache filename prefix. + * The template cache filename prefix. * * @var string */ @@ -117,6 +117,10 @@ public function getCacheFilename($name) { // twig extensions, so we need to take into account the \Drupal::VERSION // deployment identifier, much like for the container itself. + if (!$this->cache) { + return FALSE; + } + $class = substr($this->getTemplateClass($name), strlen($this->templateClassPrefix)); // Just check the list of loaded extensions once.