Merge "Removed squid purge in generateAndSaveThumb()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 18 Jul 2015 19:45:33 +0000 (19:45 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 18 Jul 2015 19:45:33 +0000 (19:45 +0000)
includes/filerepo/file/File.php

index 7ea658d..f9e1128 100644 (file)
@@ -1095,7 +1095,7 @@ abstract class File implements IDBAccessObject {
         * @return bool|MediaTransformOutput
         */
        public function generateAndSaveThumb( $tmpFile, $transformParams, $flags ) {
-               global $wgUseSquid, $wgIgnoreImageErrors;
+               global $wgIgnoreImageErrors;
 
                $stats = RequestContext::getMain()->getStats();
 
@@ -1149,21 +1149,6 @@ abstract class File implements IDBAccessObject {
                        Hooks::run( 'FileTransformed', array( $this, $thumb, $tmpThumbPath, $thumbPath ) );
                }
 
-               // Purge. Useful in the event of Core -> Squid connection failure or squid
-               // purge collisions from elsewhere during failure. Don't keep triggering for
-               // "thumbs" which have the main image URL though (bug 13776)
-               if ( $wgUseSquid ) {
-                       if ( !$thumb || $thumb->isError() || $thumb->getUrl() != $this->getURL() ) {
-                               $starttime = microtime( true );
-
-                               SquidUpdate::purge( array( $thumbUrl ) );
-
-                               $stats->timing( 'media.thumbnail.generate.purge', microtime( true ) - $starttime );
-                       }
-               }
-
-
-
                return $thumb;
        }