After the rework of the caching in WebContentGenerator (see #16413), it is no longer backwards compatible with some older configurations. In our case, we have the following XML config:
<!-- WebContentInterceptor, taking care of caching headers on static resources and anti caching headers on other resources -->
<!-- By default, do not cache anything -->
<!-- Cache for one year -->
This causes all resources to have 'no-cache' headers applied. Reason for this is that the (deprecated) alwaysMustRevalidate triggers the variable usePreviousHttpCachingBehavior. This causes checkAndPrepare(HttpServletRequest, HttpServletResponse, CacheControl) to completely ignore the CacheControl setting specific to the request.
Workaround is to make sure you do not combine any of the deprecated methods with custom cacheMappings, but it is probably better to get this fixed to prevent surprises on upgrades.
Btw, even if this is fixed, there is still quite a change in the behaviour of an XML configured WebContentInterceptor, which is that the old implementation sends an Expires and Pragma header by default, and the new implementation only sends an HTTP 1.1 Cache-Control header. I'm unsure if this affects any reasonably up-to-date browsers, but it is still something that may need some documentation. I haven't found a way to specify the CacheControl object from XML for anything but mvc:resources entries.
Please let me know about uses cases where those new defaults could cause issues.
On the documentation side, most of it is already written here but I do agree that those behavior changes should be documented somewhere. I'll probably add a note in the what's new section that points to our own Migration guide.
Many thanks for the quick fix! I'm not aware of a case where the missing HTTP 1.0 headers would be an issue, but I won't be able to fully verify this (and the fix) until next week. If I find any use case that causes issues, I will let you know :-)