Skip to content

Commit 7bec6df

Browse files
committed
[Router] Discard in-memory cache of routes when writing the file-based cache
1 parent 22f15a6 commit 7bec6df

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Router.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ function (ConfigCacheInterface $cache) {
294294
}
295295

296296
$cache->write($dumper->dump(), $this->getRouteCollection()->getResources());
297+
unset(self::$cache[$cache->getPath()]);
297298
}
298299
);
299300

@@ -325,6 +326,7 @@ function (ConfigCacheInterface $cache) {
325326
$dumper = $this->getGeneratorDumperInstance();
326327

327328
$cache->write($dumper->dump(), $this->getRouteCollection()->getResources());
329+
unset(self::$cache[$cache->getPath()]);
328330
}
329331
);
330332

0 commit comments

Comments
 (0)