Change record status: 
Project: 
Introduced in branch: 
10.4.x, 11.x
Introduced in version: 
10.4.0, 11.1.0
Description: 

Dynamic Page Cache now respects cacheability information provided by route access checkers, which it previously ignored.

Before this change, developers needed to ensure cacheability information was bubbled up from page controllers. For instance, if page access was determined on a per-user basis but the content did not vary per user, developers had to add the user cache context to the render array or response object returned by the controller. Without this, the Dynamic Page Cache module would not correctly cache the page per user.

With this change, the cacheability information for a page is now calculated based on the cacheability data from both the page controller and the route access checker. This improvement enhances the reusability of page controllers, as multiple routes can now use the same controller while providing different cacheability information via route access checkers. This allows for more flexible and efficient caching strategies.

Impacts: 
Module developers