require_once __DIR__ . '/Maintenance.php';
use Wikimedia\Rdbms\IDatabase;
+use MediaWiki\MediaWikiServices;
/**
* Usage:
public function execute() {
$dbw = $this->getDB( DB_MASTER );
- $this->wikiId = $dbw->getWikiID();
-
- $this->wanCache = ObjectCache::getMainWANInstance();
+ $this->wikiId = $dbw->getDomainID();
+ $this->wanCache = MediaWikiServices::getInstance()->getMainWANObjectCache();
$ns = $this->getOption( 'ns' );
if ( !ctype_digit( $ns ) && $ns !== 'all' ) {
}
protected function clearCache( $page_id, $rev_id ) {
- $contentModelKey = $this->wanCache->makeKey( 'page', 'content-model', $rev_id );
+ $contentModelKey = $this->wanCache->makeKey( 'page-content-model', $rev_id );
$revisionKey =
$this->wanCache->makeGlobalKey( 'revision', $this->wikiId, $page_id, $rev_id );