r76160 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76159‎ | r76160 | r76161 >
Date:23:00, 5 November 2010
Author:hartman
Status:ok (Comments)
Tags:
Comment:
follow up r76111. I had picked the wrong timedifference for the filecache.
Modified paths:
  • /trunk/phase3/includes/filerepo/ForeignAPIRepo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/ForeignAPIRepo.php
@@ -255,7 +255,8 @@
256256 wfDebug( __METHOD__ . " Thumbnail was already downloaded before\n" );
257257 $modified = filemtime( $localFilename );
258258 $remoteModified = strtotime( $metadata['timestamp'] );
259 - $diff = abs( $modified - $remoteModified );
 259+ $current = time();
 260+ $diff = abs( $modified - $current );
260261 if( $remoteModified < $modified && $diff < $this->fileCacheExpiry ) {
261262 /* Use our current and already downloaded thumbnail */
262263 $wgMemc->set( $key, $localUrl, $this->apiThumbCacheExpiry );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r76111InstantCommons: API caching expires after a day. Now check for existing prese...hartman16:26, 5 November 2010

Comments

#Comment by MarkAHershberger (talk | contribs)   00:45, 13 January 2011

Giving this to sam so he can look at this when he looks at r76111

Status & tagging log