Closed (fixed)
Project:
Drupal core
Version:
10.4.x-dev
Component:
routing system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Jul 2024 at 16:42 UTC
Updated:
13 Aug 2024 at 12:59 UTC
Jump to comment: Most recent
Comments
Comment #3
catchMR does two things:
1. When generating the cache ID, runs the same logic as the decode inbound path processor. That processor should be merged into the router, all it does by trying to decouple it is create inconsistencies. See #3456244: Normalize the incoming path with urldecode directly in RouteProvider for more.
2. When no routes are found, instead of caching a serialized empty route collection, caches FALSE instead. Given 404s are unbounded, while this is a relatively small saving, it's potentially multiplied by a lot of cache items.
Comment #4
andypostComment #5
catchMoved the URL normalization stuff into #3456244: Normalize the incoming path with urldecode directly in RouteProvider.
Comment #6
catchComment #7
smustgrave commentedearly returns make sense.
Not for this issue but would be neat to eventually have a performance test around caching if possible?
Comment #8
catchI did think about test coverage here but all we could really do is assert the contents of the cache entry when no routes are found rather than a performance test, which feels a bit too much like repeating what the code does.
Comment #11
nod_some phpcs issue
Comment #12
catchSorry, sloppiness.
Comment #16
nod_Committed and pushed da5f6215a9 to 11.x and 41ac5c1446 to 10.4.x. Thanks!