From: Chad Horohoe Date: Thu, 3 Jul 2008 21:12:32 +0000 (+0000) Subject: Revert thumb caching because it wasn't actually caching what I thought it was. X-Git-Tag: 1.31.0-rc.0~46764 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=009e1897ee3e8737b0c1feccfc1743461423918d;p=lhc%2Fweb%2Fwiklou.git Revert thumb caching because it wasn't actually caching what I thought it was. --- diff --git a/includes/filerepo/ForeignAPIFile.php b/includes/filerepo/ForeignAPIFile.php index d0add602b6..aaf922048e 100644 --- a/includes/filerepo/ForeignAPIFile.php +++ b/includes/filerepo/ForeignAPIFile.php @@ -31,26 +31,13 @@ class ForeignAPIFile extends File { } function transform( $params, $flags = 0 ) { - global $wgMemc; $thumbUrl = $this->repo->getThumbUrl( $this->getName(), isset( $params['width'] ) ? $params['width'] : -1, isset( $params['height'] ) ? $params['height'] : -1 ); if( $thumbUrl ) { - if ( $this->repo->useLocalCache ) { - wfDebug("Attempting to get the thumb from the cache..."); - $key = md5($thumbUrl); - $obj = $wgMemc->get($key); - if ($obj) { - wfDebug("success!\n"); - return $obj; - } - wfDebug("miss\n"); - } - $res = $this->handler->getTransform( $this, 'bogus', $thumbUrl, $params );; - if ( $res && $this->repo->useLocalCache ) $wgMemc->set( $key, $res, $this->repo->localCacheExpiry ); wfDebug( __METHOD__ . " got remote thumb $thumbUrl\n" ); - return $res; + return $this->handler->getTransform( $this, 'bogus', $thumbUrl, $params );; } return false; }