* This just purges an unused key as OldLocalFile::getCacheKey
simply returns false (rather than a key with "oldfile" in it)
Change-Id: Ic7dda9bf192803a75eaa9bd3bb5a145ad1409dd2
function purgeMetadataCache() {
$this->loadFromDB( File::READ_LATEST );
$this->saveToCache();
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 );
- }
$this->purgeOldThumbnails( $archiveName );
if ( $status->isOK() ) {
$this->purgeDescription();
$this->purgeOldThumbnails( $archiveName );
if ( $status->isOK() ) {
$this->purgeDescription();
} else {
wfDebug( __METHOD__ . " restored {$status->successCount} as archived versions\n" );
$this->file->purgeDescription();
} else {
wfDebug( __METHOD__ . " restored {$status->successCount} as archived versions\n" );
$this->file->purgeDescription();
- $this->file->purgeHistory();
$this->output( "Purging all thumbnails for file '$filename'..." );
$file->purgeCache();
$this->output( "Purging all thumbnails for file '$filename'..." );
$file->purgeCache();
$this->output( "done.\n" );
if ( $afile instanceof ArchivedFile ) {
$this->output( "done.\n" );
if ( $afile instanceof ArchivedFile ) {
// Purge current version and any versions in oldimage table
$file->purgeCache();
// Purge current version and any versions in oldimage table
$file->purgeCache();
if ( $logType === 'delete' ) {
// If there is an orphaned storage file... delete it
if ( $logType === 'delete' ) {
// If there is an orphaned storage file... delete it
$target = $params['4::target'];
$targetFile = $repo->newFile( Title::makeTitle( NS_FILE, $target ) );
$targetFile->purgeCache();
$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" );
}
}
$this->verbose( "Purged file {$target}; move target @{$row->log_timestamp}.\n" );
}
}