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
This commit is contained in:
parent
c3774da3b5
commit
c518eaf0e0
3 changed files with 0 additions and 22 deletions
|
|
@ -844,23 +844,6 @@ class LocalFile extends File {
|
|||
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 @@ class LocalFile extends File {
|
|||
$this->purgeOldThumbnails( $archiveName );
|
||||
if ( $status->isOK() ) {
|
||||
$this->purgeDescription();
|
||||
$this->purgeHistory();
|
||||
}
|
||||
|
||||
if ( $wgUseSquid ) {
|
||||
|
|
@ -2565,7 +2547,6 @@ class LocalFileRestoreBatch {
|
|||
} else {
|
||||
wfDebug( __METHOD__ . " restored {$status->successCount} as archived versions\n" );
|
||||
$this->file->purgeDescription();
|
||||
$this->file->purgeHistory();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,6 @@ class EraseArchivedFile extends Maintenance {
|
|||
|
||||
$this->output( "Purging all thumbnails for file '$filename'..." );
|
||||
$file->purgeCache();
|
||||
$file->purgeHistory();
|
||||
$this->output( "done.\n" );
|
||||
|
||||
if ( $afile instanceof ArchivedFile ) {
|
||||
|
|
|
|||
|
|
@ -166,7 +166,6 @@ class PurgeChangedFiles extends Maintenance {
|
|||
|
||||
// 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 @@ class PurgeChangedFiles extends Maintenance {
|
|||
$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" );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue