summaryrefslogtreecommitdiff
path: root/maintenance/rebuildmessages.php
blob: b0adc875b3756509941898258466a7a829ab0465 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
/**
 * This script purges all language messages from memcached
 * @file
 * @ingroup Maintenance
 */

require_once( 'commandLine.inc' );

if( $wgLocalDatabases ) {
	$databases = $wgLocalDatabases;
} else {
	$databases = array( $wgDBname );
}

foreach( $databases as $db ) {
	echo "Deleting message cache for {$db}... ";
	$messageMemc->delete( "{$db}:messages" );
	if( $wgEnableSidebarCache )
		$messageMemc->delete( "{$db}:sidebar" );
	echo "Deleted\n";
}