From 36dab182b8db532432b25c1aa7bea4be6b90f152 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Sun, 30 Nov 2008 09:44:00 +0000 Subject: [PATCH] Allow DB to be used during LocalSettings.php et al by changing plain get of global $wgMemc to wfGetMainCache(), which will load memcached if necessary. --- includes/db/LoadMonitor.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/db/LoadMonitor.php b/includes/db/LoadMonitor.php index 8e16f1a1a7..929ab2b9e1 100644 --- a/includes/db/LoadMonitor.php +++ b/includes/db/LoadMonitor.php @@ -64,6 +64,9 @@ class LoadMonitor_MySQL implements LoadMonitor { $requestRate = 10; global $wgMemc; + if ( empty( $wgMemc ) ) + $wgMemc = wfGetMainCache(); + $masterName = $this->parent->getServerName( 0 ); $memcKey = wfMemcKey( 'lag_times', $masterName ); $times = $wgMemc->get( $memcKey ); -- 2.20.1