Attempt at cleaning up r45764, r45769 (renamed indices for SQLite compat):
[lhc/web/wiklou.git] / includes / db / LoadMonitor.php
index 8e16f1a..929ab2b 100644 (file)
@@ -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 );