From: Aaron Schulz Date: Sun, 1 Nov 2015 09:05:34 +0000 (-0800) Subject: Convert JobQueueDB to using the WAN cache X-Git-Tag: 1.31.0-rc.0~9139^2 X-Git-Url: http://git.cyclocoop.org//%27http:/code.google.com/p/ie7-js//%27?a=commitdiff_plain;h=8ad6c52d4fce41a23f6fbccd187a7080b9cf5812;p=lhc%2Fweb%2Fwiklou.git Convert JobQueueDB to using the WAN cache Change-Id: Ie5820d1439014572ca171c9303d51a8d3938ad00 --- diff --git a/includes/jobqueue/JobQueueDB.php b/includes/jobqueue/JobQueueDB.php index 6ecfaf4001..ed2d0fab2e 100644 --- a/includes/jobqueue/JobQueueDB.php +++ b/includes/jobqueue/JobQueueDB.php @@ -33,7 +33,7 @@ class JobQueueDB extends JobQueue { const MAX_JOB_RANDOM = 2147483647; // integer; 2^31 - 1, used for job_random const MAX_OFFSET = 255; // integer; maximum number of rows to skip - /** @var BagOStuff */ + /** @var WANObjectCache */ protected $cache; /** @var bool|string Name of an external DB cluster. False if not set */ @@ -48,13 +48,10 @@ class JobQueueDB extends JobQueue { * @param array $params */ protected function __construct( array $params ) { - global $wgMemc; - parent::__construct( $params ); $this->cluster = isset( $params['cluster'] ) ? $params['cluster'] : false; - // Make sure that we don't use the SQL cache, which would be harmful - $this->cache = ( $wgMemc instanceof SqlBagOStuff ) ? new EmptyBagOStuff() : $wgMemc; + $this->cache = ObjectCache::getMainWANInstance(); } protected function supportedOrders() {