* @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'] ) {
* @return bool
*/
function storeInMemcached( $mckey, $expiry = 86400 ) {
- global $wgMemc;
-
- $wgMemc->set( $mckey,
+ ObjectCache::getMainWANInstance()->set( $mckey,
array(
'timestamp' => wfTimestampNow(),
'value' => $this->mText