Revert "Fixed behavior of Title::invalidateCache."
authorTim Starling <tstarling@wikimedia.org>
Mon, 6 May 2013 00:52:46 +0000 (00:52 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 6 May 2013 00:52:46 +0000 (00:52 +0000)
Causes jenkins build failure

This reverts commit 3b4c514efa08b0a68885b1a920e48f670cd06e15

Change-Id: Ieeb54f1e7a9cfb5ac02b8a9f49bbe0644a064fa0

includes/Title.php
includes/WikiPage.php
includes/actions/InfoAction.php
includes/job/jobs/RefreshLinksJob.php

index 32f585e..70e8cd4 100644 (file)
@@ -4504,8 +4504,18 @@ class Title {
                                $method
                        );
                } );
+               HTMLFileCache::clearFileCache( $this );
 
-               return true;
+               // Clear page info.
+               $revision = WikiPage::factory( $this )->getRevision();
+               if ( $revision !== null ) {
+                       $memcKey = wfMemcKey( 'infoaction', $this->getPrefixedText(), $revision->getId() );
+                       $success = $wgMemc->delete( $memcKey );
+               } else {
+                       $success = true;
+               }
+
+               return $success;
        }
 
        /**
index 76d0166..8c00e1b 100644 (file)
@@ -2437,7 +2437,6 @@ class WikiPage implements Page, IDBAccessObject {
                }
 
                $this->mTitle->flushRestrictions();
-               InfoAction::invalidateCache( $this->mTitle );
 
                if ( $logAction == 'unprotect' ) {
                        $logParams = array();
@@ -2908,7 +2907,6 @@ class WikiPage implements Page, IDBAccessObject {
 
                // File cache
                HTMLFileCache::clearFileCache( $title );
-               InfoAction::invalidateCache( $title );
 
                // Messages
                if ( $title->getNamespace() == NS_MEDIAWIKI ) {
@@ -2951,7 +2949,6 @@ class WikiPage implements Page, IDBAccessObject {
 
                // Clear file cache for this page only
                HTMLFileCache::clearFileCache( $title );
-               InfoAction::invalidateCache( $title );
        }
 
        /**#@-*/
index 49613e7..a8905d8 100644 (file)
@@ -55,21 +55,6 @@ class InfoAction extends FormlessAction {
                return false;
        }
 
-       /**
-        * Clear the info cache for a given Title.
-        *
-        * @since 1.22
-        * @param Title $title Title to clear cache for
-        */
-       public static function invalidateCache( Title $title ) {
-               // Clear page info.
-               $revision = WikiPage::factory( $title )->getRevision();
-               if ( $revision !== null ) {
-                       $memcKey = wfMemcKey( 'infoaction', $this->getPrefixedText(), $revision->getId() );
-                       $wgMemc->delete( $memcKey );
-               }
-       }
-
        /**
         * Shows page information on GET request.
         *
index c5f87c5..57cad87 100644 (file)
@@ -60,7 +60,6 @@ class RefreshLinksJob extends Job {
                }
 
                self::runForTitleInternal( $this->title, $revision, __METHOD__ );
-               InfoAction::invalidateCache( $this->title );
 
                return true;
        }