Split each path param into a separate cache key (#85758)
Refactors the keypath used to cache segments so that each route param is a separate cache key. The search string was already its own separate key, so this generalizes it to include path params, too. This is a prerequisite for reusing cache entries across different values of a param if the server indicates that the response does not vary on that param. Currently the server does not send that information, but we'll add this in a subsequent step. As part of this change, this refines the concept of a "keypath" to be called a "vary path" instead. From the perspective of the CacheMap module, they are functionally identical, but from the perspective of the overall caching design, it's more specific: a vary path is a pure function of a segment's position in a particular route tree and the (post-rewrite) URL that is being queried. More concretely, successive queries of the cache for the same segment always use the same vary path.
Showing
This diff is collapsed.
This diff is collapsed.
Please
register
or
sign in
to comment