X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2FAjaxResponse.php;h=8f4ed40489dce0904998fc637fde381ce6076570;hb=14d9e80ba42c471f1c9e92c5cb6808b4723b5945;hp=0c115053bac9642f36cbb1d02251e91374073712;hpb=284bc0b5eb1c0e47d7100d5604ab4d5180dcd8d5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/AjaxResponse.php b/includes/AjaxResponse.php index 0c115053ba..8f4ed40489 100644 --- a/includes/AjaxResponse.php +++ b/includes/AjaxResponse.php @@ -186,6 +186,7 @@ class AjaxResponse { # Surrogate-Control controls our CDN, Cache-Control downstream caches if ( $this->mConfig->get( 'UseESI' ) ) { + wfDeprecated( '$wgUseESI = true', '1.33' ); header( 'Surrogate-Control: max-age=' . $this->mCacheDuration . ', content="ESI/1.0"' ); header( 'Cache-Control: s-maxage=0, must-revalidate, max-age=0' ); } else { @@ -281,7 +282,8 @@ class AjaxResponse { return false; } - $mcvalue = ObjectCache::getMainWANInstance()->get( $mckey ); + $cache = MediaWikiServices::getInstance()->getMainWANObjectCache(); + $mcvalue = $cache->get( $mckey ); if ( $mcvalue ) { # Check to see if the value has been invalidated if ( $touched <= $mcvalue['timestamp'] ) { @@ -303,11 +305,13 @@ class AjaxResponse { * @return bool */ function storeInMemcached( $mckey, $expiry = 86400 ) { - ObjectCache::getMainWANInstance()->set( $mckey, + $cache = MediaWikiServices::getInstance()->getMainWANObjectCache(); + $cache->set( $mckey, [ 'timestamp' => wfTimestampNow(), 'value' => $this->mText - ], $expiry + ], + $expiry ); return true;