Merge "Use HTTP method as hint for the locking mode of sqlite"
[lhc/web/wiklou.git] / includes / media / DjVuHandler.php
index ed62ba1..a0e7f2c 100644 (file)
@@ -20,6 +20,7 @@
  * @file
  * @ingroup Media
  */
+use MediaWiki\MediaWikiServices;
 
 /**
  * Handler for DjVu images
@@ -402,7 +403,7 @@ class DjVuHandler extends ImageHandler {
        }
 
        protected function getDimensionInfo( File $file ) {
-               $cache = ObjectCache::getMainWANInstance();
+               $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
                return $cache->getWithSetCallback(
                        $cache->makeKey( 'file-djvu', 'dimensions', $file->getSha1() ),
                        $cache::TTL_INDEFINITE,