Page MenuHomePhabricator

Less thumbnail downloads for InstantCommons
Closed, ResolvedPublic

Description

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.


Version: 1.17.x
Severity: enhancement

Attached:

Details

Reference
bz25790

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:11 PM
bzimport set Reference to bz25790.
bzimport added a subscriber: Unknown Object (MLST).