https://bugzilla.wikimedia.org/show_bug.cgi?id=25790

           Summary: Less thumbnail downloads for InstantCommons
           Product: MediaWiki
           Version: 1.17-svn
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: need-review, patch
          Severity: enhancement
          Priority: Normal
         Component: Images and files
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: hart...@videolan.org
                CC: gpaum...@wikimedia.org, bryan.tongm...@gmail.com


Created attachment 7790
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=7790
preserve files longer

Currently all thumbnails for InstantCommons are redownloaded when the api cache
expires after 1 day. This is mostly done because these thumbs are not purged
when a user uploads a new file on Commons.

However, from the api, we can get the timestamp of upload. This patch checks if
there is already a file at the thumbnail location, checks to see if the commons
timestamp is newer than the local thumb timestamp and then reuses that file,
bypassing the need to download it from commons and to write it to disk again.

I have built in a new safety net at 1 month, though of course we could play
with that. Should save upload.wikimedia.org some unneeded traffic, which with
the more widely used InstantCommons surely cannot hurt.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to