On 31/08/12 22:36, Ariel T. Glenn wrote:
So there are some things we could change:
- We could generate and keep only certain sizes, tossing the rest.
- We could keep *nothing*, scaling all media as required.
- We could have a cron job that was clever about tossing thumbs every
day (not sure how easy it would be to be clever). 4. ??
I'll go for option 4. You can't delete the images from the backend while they are still in Squid, because then they would not be purged when the image is updated or action=purge is requested. In fact, that is one of only two reasons for the existence of the backend thumbnail store on Wikimedia. The thumbnail backend could be replaced by a text file that stores a list of thumbnail filenames which were sent to Squid within a window equivalent to the expiry time sent in the Cache-Control header.
The other reason for the existence of the backend thumbnail store is to transport images from the thumbnail scalers to the 404 handler. For that purpose, the image only needs to exist in the backend for a few seconds. It could be replaced by a better 404 handler, that sends thumbnails directly by HTTP. Maybe the Swift one does that already.
-- Tim Starling