From: Aaron Schulz Date: Fri, 2 May 2008 21:29:05 +0000 (+0000) Subject: Don't keep puring squids for images where no thumb is needed (bug 13776) X-Git-Tag: 1.31.0-rc.0~47942 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=bbc214a4acb0137b0b091e2fa3e3e78aa5bb6117;p=lhc%2Fweb%2Fwiklou.git Don't keep puring squids for images where no thumb is needed (bug 13776) --- diff --git a/includes/filerepo/File.php b/includes/filerepo/File.php index 5d2db79a1d..d1b0cd54c1 100644 --- a/includes/filerepo/File.php +++ b/includes/filerepo/File.php @@ -546,8 +546,11 @@ abstract class File { $thumb = $this->handler->getTransform( $this, $thumbPath, $thumbUrl, $params ); } } - - if ( $wgUseSquid ) { + + // 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 && !$thumb->isError() && $thumb->url != $this->getURL() ) { SquidUpdate::purge( array( $thumbUrl ) ); } } while (false);