MW_NO_SESSION is supposed to be used in a deterministic way
(either always or never for a given endpoint) so there is
no point to split the cache on session cookies when it is
used (except when it's set to 'warn' in which case it is
not really used).
Bug: T127233
Change-Id: If44e0ec2167359e081e1b4cd4d21e62bd357d23e
}
public function getVaryHeaders() {
+ if ( defined( 'MW_NO_SESSION' ) && MW_NO_SESSION !== 'warn' ) {
+ return [];
+ }
if ( $this->varyHeaders === null ) {
$headers = [];
foreach ( $this->getProviders() as $provider ) {
}
public function getVaryCookies() {
+ if ( defined( 'MW_NO_SESSION' ) && MW_NO_SESSION !== 'warn' ) {
+ return [];
+ }
if ( $this->varyCookies === null ) {
$cookies = [];
foreach ( $this->getProviders() as $provider ) {