The Wikimedia production cluster uses custom configuration in its Varnish caching layer (rOPUPb73afc51fedb: Make sure Set-Cookie responses are not cacheable, and log violations) to to protect against inadvertently caching responses from MediaWiki which carry Set-Cookie headers. This is a protection against an intermediate cache accidentally delivering a cookie header that may be user specific to multiple clients.
MediaWiki itself should attempt to provide such protection for the benefit of all deployments.