From: Aaron Schulz Date: Wed, 13 Jan 2016 17:31:39 +0000 (-0800) Subject: Add more preOutputCommit() comments X-Git-Tag: 1.31.0-rc.0~8300 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=bab8764cb7ebc675c0a970108fbd346f4faf0e33 Add more preOutputCommit() comments Change-Id: Ia0b4c37b391b8e5e77397d21458f9638b49ebf71 --- diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php index ab02ba75b5..0e3a734e93 100644 --- a/includes/MediaWiki.php +++ b/includes/MediaWiki.php @@ -566,8 +566,9 @@ class MediaWiki { DeferredUpdates::doUpdates( 'enqueue', DeferredUpdates::PRESEND ); wfDebug( __METHOD__ . ': pre-send deferred updates completed' ); - // Set a cookie to tell all CDN edge nodes to "stick" the user to the - // DC that handles this POST request (e.g. the "master" data center) + // Set a cookie to tell all CDN edge nodes to "stick" the user to the DC that handles this + // POST request (e.g. the "master" data center). Also have the user briefly bypass CDN so + // ChronologyProtector works for cacheable URLs. $request = $context->getRequest(); if ( $request->wasPosted() && $factory->hasOrMadeRecentMasterChanges() ) { $expires = time() + $config->get( 'DataCenterUpdateStickTTL' ); @@ -576,7 +577,8 @@ class MediaWiki { $request->response()->setCookie( 'UseCDNCache', 'false', $expires, $options ); } - // Avoid letting a few seconds of slave lag cause a month of stale data + // Avoid letting a few seconds of slave lag cause a month of stale data. This logic is + // also intimately related to the value of $wgCdnReboundPurgeDelay. if ( $factory->laggedSlaveUsed() ) { $maxAge = $config->get( 'CdnMaxageLagged' ); $context->getOutput()->lowerCdnMaxage( $maxAge );