diff --git a/core/lib/Drupal/Core/Template/TwigEnvironment.php b/core/lib/Drupal/Core/Template/TwigEnvironment.php index a060f48078..e203054bdc 100644 --- a/core/lib/Drupal/Core/Template/TwigEnvironment.php +++ b/core/lib/Drupal/Core/Template/TwigEnvironment.php @@ -3,6 +3,7 @@ namespace Drupal\Core\Template; use Drupal\Core\Cache\CacheBackendInterface; +use Drupal\Core\PhpStorage\PhpStorageFactory; use Drupal\Core\Render\Markup; use Drupal\Core\State\StateInterface; @@ -102,6 +103,7 @@ public function __construct($root, CacheBackendInterface $cache, $twig_extension * @see \drupal_flush_all_caches */ public function invalidate() { + PhpStorageFactory::get('twig')->deleteAll(); $this->state->delete(static::CACHE_PREFIX_METADATA_KEY); }