Http::getProxy() method to get proxy configuration
[lhc/web/wiklou.git] / includes / Revision.php
index 24c025f..a498817 100644 (file)
@@ -1530,12 +1530,13 @@ class Revision implements IDBAccessObject {
         */
        protected function loadText() {
                // Caching may be beneficial for massive use of external storage
-               global $wgRevisionCacheExpiry, $wgMemc;
+               global $wgRevisionCacheExpiry;
 
+               $cache = ObjectCache::getMainWANInstance();
                $textId = $this->getTextId();
                $key = wfMemcKey( 'revisiontext', 'textid', $textId );
                if ( $wgRevisionCacheExpiry ) {
-                       $text = $wgMemc->get( $key );
+                       $text = $cache->get( $key );
                        if ( is_string( $text ) ) {
                                wfDebug( __METHOD__ . ": got id $textId from cache\n" );
                                return $text;
@@ -1582,7 +1583,7 @@ class Revision implements IDBAccessObject {
 
                # No negative caching -- negative hits on text rows may be due to corrupted slave servers
                if ( $wgRevisionCacheExpiry && $text !== false ) {
-                       $wgMemc->set( $key, $text, $wgRevisionCacheExpiry );
+                       $cache->set( $key, $text, $wgRevisionCacheExpiry );
                }
 
                return $text;