X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Futils%2FFileContentsHasher.php;h=afe9c0a0f08e145a7930b21bbd1de36df0ce9954;hp=c86691903b0479ccd53ab893132c3b1b1744e55f;hb=12601ff7d2796752404bfb331fccc41083d31f9f;hpb=557c331645173b60171e1cbcc9b921e39de9710b diff --git a/includes/utils/FileContentsHasher.php b/includes/utils/FileContentsHasher.php index c86691903b..afe9c0a0f0 100644 --- a/includes/utils/FileContentsHasher.php +++ b/includes/utils/FileContentsHasher.php @@ -27,11 +27,8 @@ class FileContentsHasher { /** @var FileContentsHasher */ private static $instance; - /** - * Constructor. - */ public function __construct() { - $this->cache = ObjectCache::newAccelerator( 'hash' ); + $this->cache = ObjectCache::getLocalServerInstance( 'hash' ); } /** @@ -62,7 +59,7 @@ class FileContentsHasher { return false; } - $cacheKey = wfGlobalCacheKey( __CLASS__, $filePath, $mtime, $algo ); + $cacheKey = $this->cache->makeGlobalKey( __CLASS__, $filePath, $mtime, $algo ); $hash = $this->cache->get( $cacheKey ); if ( $hash ) {