Commit c99c74b
committed
bug #57645 [Routing] Discard in-memory cache of routes when writing the file-based cache (mpdude)
This PR was merged into the 5.4 branch.
Discussion
----------
[Routing] Discard in-memory cache of routes when writing the file-based cache
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix #57640
| License | MIT
The `Router` has a `private static ?array $cache` field that it uses to cache compiled route collections in the case that OpCache is not available to cache the file-based cache already. This is somewhat [a poor man's Opcache replacement](symfony/symfony#57640 (comment)), useful e. g. for speedups during (functional) tests.
`\Symfony\Component\Config\ResourceCheckerConfigCache::write` contains special code to make sure the OpCache will reload files after they have been written, but the `static` property kind of "hides" this feature.
With this PR, the `static` cache entry is cleared as well.
Commits
-------
de7d8849eb [Router] Discard in-memory cache of routes when writing the file-based cache1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| 297 | + | |
297 | 298 | | |
298 | 299 | | |
299 | 300 | | |
| |||
325 | 326 | | |
326 | 327 | | |
327 | 328 | | |
| 329 | + | |
328 | 330 | | |
329 | 331 | | |
330 | 332 | | |
| |||
0 commit comments