Change record status: 
Project: 
Introduced in branch: 
main
Introduced in version: 
11.5.0
Description: 

The RouteProvider previously cached every possible request, including requests with query parameters and lookups without any matches (404's).

This can grow to thousands of cache entries, with low hit rate and frequent invalidation, as the route_match cache tag can be frequently invalidated, such as when path aliases change.

As as first step, empty results are no longer persisted in the cache as they are likely not requested often and cached, a cache lookup is still necessary as it is not known whether there will be any results.

By default, for any request that has query parameters, caching is completely disabled, including cache lookups.

Sites and modules may customize this by subclassing the RouteProvider and either disable caching completely (this can be beneficial when very frequent route_match cache tag invalidations result in a very low cache hit rate) or add enable caching for some or all query parameters by overriding the useRouteCache method.

More fine-tuning may be done in future issues to either add back more caching or remove it entirely.

Impacts: 
Site builders, administrators, editors
Module developers