Merge "Convert article delete to use OOUI"
[lhc/web/wiklou.git] / includes / utils / FileContentsHasher.php
index c866919..afe9c0a 100644 (file)
@@ -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 ) {