From: Ori Livneh Date: Wed, 23 Mar 2016 19:37:01 +0000 (-0700) Subject: Request-local caching of DjVu dimensions X-Git-Tag: 1.31.0-rc.0~7534^2 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=a82c1dc0fb8ec611b005a808226be194f0a50e24;p=lhc%2Fweb%2Fwiklou.git Request-local caching of DjVu dimensions Make DjVuHandler::getDimensionInfo() cache dimension info in memory so that operations which get the dimensions of each page don't result in multiple round-trips to memcached. Change-Id: Idbd11637a8f7d87e4774f76a5b90d7469f3b0857 --- diff --git a/includes/media/DjVu.php b/includes/media/DjVu.php index d4ef8a875e..cd249a86f6 100644 --- a/includes/media/DjVu.php +++ b/includes/media/DjVu.php @@ -419,7 +419,8 @@ class DjVuHandler extends ImageHandler { } return [ 'pageCount' => $count, 'dimensionsByPage' => $dimsByPage ]; - } + }, + [ 'pcTTL' => WANObjectCache::TTL_INDEFINITE ] ); }