X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FAjaxResponse.php;h=34bb65f19bd7cc3305f0681170fccfbc05d49350;hb=80a3c6eb611e27e479d7951feea4aac7473557e1;hp=6c2efc296aa52c2c3f06f14e6c106cb6213addb7;hpb=23f5395a8c772d8076ef7033aac43945e963e40c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/AjaxResponse.php b/includes/AjaxResponse.php index 6c2efc296a..34bb65f19b 100644 --- a/includes/AjaxResponse.php +++ b/includes/AjaxResponse.php @@ -276,13 +276,11 @@ class AjaxResponse { * @return bool */ function loadFromMemcached( $mckey, $touched ) { - global $wgMemc; - if ( !$touched ) { return false; } - $mcvalue = $wgMemc->get( $mckey ); + $mcvalue = ObjectCache::getMainWANInstance()->get( $mckey ); if ( $mcvalue ) { # Check to see if the value has been invalidated if ( $touched <= $mcvalue['timestamp'] ) { @@ -304,9 +302,7 @@ class AjaxResponse { * @return bool */ function storeInMemcached( $mckey, $expiry = 86400 ) { - global $wgMemc; - - $wgMemc->set( $mckey, + ObjectCache::getMainWANInstance()->set( $mckey, array( 'timestamp' => wfTimestampNow(), 'value' => $this->mText