$this->title = $title;
}
+ /**
+ * Serialization handler, diasallows to serialize the database to prevent
+ * failures after this class is deserialized from cache with dead DB connection.
+ */
+ function __sleep() {
+ return array( 'partitionCache', 'fullResultCache', 'title' );
+ }
+
/**
* Clear locally stored data
*/
// Try memcached
global $wgMemc;
- global $wgContLang;
$memcKey = wfMemcKey(
'backlinks',
$batchSize
);
- if ( $wgContLang === null ) $wgContLang = new Language;
- if ( $wgMemc === null ) $wgMemc =& wfGetMainCache();
-
$memcValue = $wgMemc->get( $memcKey );
if ( is_array( $memcValue ) ) {