From: Aaron Schulz Date: Tue, 5 Feb 2013 20:09:21 +0000 (-0800) Subject: [JobQueue] Update "empty" cache key when jobs are recycled. X-Git-Tag: 1.31.0-rc.0~20794^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=cfe59fa8b5fb35cc603b8cb920f6580da5654c82;p=lhc%2Fweb%2Fwiklou.git [JobQueue] Update "empty" cache key when jobs are recycled. Change-Id: Iadc78e7d64750211b0168492e41fb871ce9be208 --- diff --git a/includes/job/JobQueueDB.php b/includes/job/JobQueueDB.php index 9b3ffa7ec7..51b35fd694 100644 --- a/includes/job/JobQueueDB.php +++ b/includes/job/JobQueueDB.php @@ -402,6 +402,8 @@ class JobQueueDB extends JobQueue { * @return integer Number of jobs recycled/deleted */ protected function recycleStaleJobs() { + global $wgMemc; + $now = time(); list( $dbw, $scope ) = $this->getMasterDB(); $count = 0; // affected rows @@ -439,6 +441,7 @@ class JobQueueDB extends JobQueue { ); $count += $dbw->affectedRows(); wfIncrStats( 'job-recycle', $dbw->affectedRows() ); + $wgMemc->set( $this->getCacheKey( 'empty' ), 'false', self::CACHE_TTL_LONG ); } }