mDescription = "Clear all interwiki links for all languages from the cache"; } public function execute() { global $wgLocalDatabases, $wgMemc; $dbr = wfGetDB( DB_SLAVE ); $res = $dbr->select( 'interwiki', array( 'iw_prefix' ), false ); $prefixes = array(); foreach ( $res as $row ) { $prefixes[] = $row->iw_prefix; } foreach ( $wgLocalDatabases as $db ) { $this->output( "$db..." ); foreach ( $prefixes as $prefix ) { $wgMemc->delete( "$db:interwiki:$prefix" ); } $this->output( "done\n" ); } } } $maintClass = "ClearInterwikiCache"; require_once( RUN_MAINTENANCE_IF_MAIN );