I'm wondering if thumb.php (although it internally reuses existing
thumbnails) play nicely with the varnish cache layer. If you get to a
point where you have to execute a PHP script you are already
generating more load than necessary.
On Thu, Sep 4, 2014 at 4:25 PM, Gergo Tisza <gtisza(a)wikimedia.org> wrote:
On Thu, Sep 4, 2014 at 5:56 PM, Daniel Schwen
<lists(a)schwen.de> wrote:
I'm not sure there is a difference (both hit
PHP and neither will
recreate
the image if it exists already), but thumb.php will result in an error
if
Well, here is what Krinkle wrote me
http://commons.wikimedia.org/w/index.php?title=Help_talk:FastCCI&diff=1…
The relevant bit is around line 300 in thumb.php (after the comment "Stream
the file if it exists already"). Also, it does return a 304 when appropriate
(of course your browser needs to send an If-Modified-Since header for that
to happen, which it probably won't do). thumb.php streams the file from a
PHP process, while Special:Redirect just sends the browser to a new location
which is served directly by the web server, so that's indeed less overhead,
especially for large files.
Anyway, thumb.php is internals, while Special:Redirect is a public URL, so
it is always more appropriate to use the latter (or the API).
_______________________________________________
Commons-l mailing list
Commons-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/commons-l