From de7d8849eb1332d5d7ce29b3eab142baeb985920 Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Thu, 4 Jul 2024 11:24:54 +0200 Subject: [PATCH] =?UTF-8?q?[Router]=C2=A0Discard=20in-memory=20cache=20of?= =?UTF-8?q?=20routes=20when=20writing=20the=20file-based=20cache?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Symfony/Component/Routing/Router.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Symfony/Component/Routing/Router.php b/src/Symfony/Component/Routing/Router.php index 48ec1018056f6..e3d38c4919501 100644 --- a/src/Symfony/Component/Routing/Router.php +++ b/src/Symfony/Component/Routing/Router.php @@ -294,6 +294,7 @@ function (ConfigCacheInterface $cache) { } $cache->write($dumper->dump(), $this->getRouteCollection()->getResources()); + unset(self::$cache[$cache->getPath()]); } ); @@ -325,6 +326,7 @@ function (ConfigCacheInterface $cache) { $dumper = $this->getGeneratorDumperInstance(); $cache->write($dumper->dump(), $this->getRouteCollection()->getResources()); + unset(self::$cache[$cache->getPath()]); } );