All,
I've been working the last 24 hours or so on improving the ForeignAPI code that Brion committed a little while back. I've implemented some rather effective caching that has gotten thumbs and remote description pages cached locally (by setting $wgForeignFileRepos['useLocalCache'] to true). Also, $wgForeignFileRepos['localCacheExpiry'] is used to set the explicit expiry time for local copies of thumbs/description pages. There's only two things left really that I see need doing:
1) One last Http::get().is still used on every request to fetch the remote image metadata. On the one hand, it would be nice to cache this, as then we could eliminate the last Http::get() request. At the same time, having the last updated timestamp would be helpful for knowing if we need to force-purge the caches because the image has been updated. I'm leaning towards the former, as I'd rather make action=purge force a recache.
2) Thumbs are still generated by the remote wiki. While I don't like idea of the server load being put on them, Brion reminded me that local wikis might not be able to transform the same mediatypes the remote wiki can, so getting the thumb from there is probably safer.
Thanks for any input people can give :-)
-Chad
wikitech-l@lists.wikimedia.org