Merge "Improve documentation of the PageContentLanguage hook"
[lhc/web/wiklou.git] / includes / deferred / WANCacheReapUpdate.php
index 74da082..a218f76 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 
+use MediaWiki\MediaWikiServices;
 use MediaWiki\Linker\LinkTarget;
 use Psr\Log\LoggerInterface;
 use Wikimedia\Rdbms\IDatabase;
@@ -11,7 +12,7 @@ use Wikimedia\Rdbms\IDatabase;
  * recentchanges table as a reliable stream to make certain keys reach consistency
  * as soon as the underlying replica database catches up. These means that critical
  * keys will not escape getting purged simply due to brief hiccups in the network,
- * which are more prone to happen accross datacenters.
+ * which are more prone to happen across datacenters.
  *
  * ----
  * "I was trying to cheat death. I was only trying to surmount for a little while the
@@ -39,7 +40,7 @@ class WANCacheReapUpdate implements DeferrableUpdate {
 
        function doUpdate() {
                $reaper = new WANObjectCacheReaper(
-                       ObjectCache::getMainWANInstance(),
+                       MediaWikiServices::getInstance()->getMainWANObjectCache(),
                        ObjectCache::getLocalClusterInstance(),
                        [ $this, 'getTitleChangeEvents' ],
                        [ $this, 'getEventAffectedKeys' ],