Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/207007

Change subject: Removed LocalFile::purgeHistory method
......................................................................

Removed LocalFile::purgeHistory method

* This just purges an unused key as OldLocalFile::getCacheKey
  simply returns false (rather than a key with "oldfile" in it)

Change-Id: Ic7dda9bf192803a75eaa9bd3bb5a145ad1409dd2
---
M includes/filerepo/file/LocalFile.php
M maintenance/eraseArchivedFile.php
M maintenance/purgeChangedFiles.php
3 files changed, 0 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/07/207007/1

diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index b4cced3..d368d90 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -844,23 +844,6 @@
        function purgeMetadataCache() {
                $this->loadFromDB( File::READ_LATEST );
                $this->saveToCache();
-               $this->purgeHistory();
-       }
-
-       /**
-        * Purge the shared history (OldLocalFile) cache.
-        *
-        * @note This used to purge old thumbnails as well.
-        */
-       function purgeHistory() {
-               global $wgMemc;
-
-               $hashedName = md5( $this->getName() );
-               $oldKey = $this->repo->getSharedCacheKey( 'oldfile', 
$hashedName );
-
-               if ( $oldKey ) {
-                       $wgMemc->delete( $oldKey );
-               }
        }
 
        /**
@@ -1667,7 +1650,6 @@
                $this->purgeOldThumbnails( $archiveName );
                if ( $status->isOK() ) {
                        $this->purgeDescription();
-                       $this->purgeHistory();
                }
 
                if ( $wgUseSquid ) {
@@ -2565,7 +2547,6 @@
                        } else {
                                wfDebug( __METHOD__ . " restored 
{$status->successCount} as archived versions\n" );
                                $this->file->purgeDescription();
-                               $this->file->purgeHistory();
                        }
                }
 
diff --git a/maintenance/eraseArchivedFile.php 
b/maintenance/eraseArchivedFile.php
index 94ca604..8fdcef3 100644
--- a/maintenance/eraseArchivedFile.php
+++ b/maintenance/eraseArchivedFile.php
@@ -73,7 +73,6 @@
 
                $this->output( "Purging all thumbnails for file '$filename'..." 
);
                $file->purgeCache();
-               $file->purgeHistory();
                $this->output( "done.\n" );
 
                if ( $afile instanceof ArchivedFile ) {
diff --git a/maintenance/purgeChangedFiles.php 
b/maintenance/purgeChangedFiles.php
index d21a296..b98e95f 100644
--- a/maintenance/purgeChangedFiles.php
+++ b/maintenance/purgeChangedFiles.php
@@ -166,7 +166,6 @@
 
                                // Purge current version and any versions in 
oldimage table
                                $file->purgeCache();
-                               $file->purgeHistory();
 
                                if ( $logType === 'delete' ) {
                                        // If there is an orphaned storage 
file... delete it
@@ -191,7 +190,6 @@
                                                $target = $params['4::target'];
                                                $targetFile = $repo->newFile( 
Title::makeTitle( NS_FILE, $target ) );
                                                $targetFile->purgeCache();
-                                               $targetFile->purgeHistory();
                                                $this->verbose( "Purged file 
{$target}; move target @{$row->log_timestamp}.\n" );
                                        }
                                }

-- 
To view, visit https://gerrit.wikimedia.org/r/207007
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic7dda9bf192803a75eaa9bd3bb5a145ad1409dd2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to