summaryrefslogtreecommitdiff
path: root/includes/cache/HTMLCacheUpdate.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /includes/cache/HTMLCacheUpdate.php
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
Diffstat (limited to 'includes/cache/HTMLCacheUpdate.php')
-rw-r--r--includes/cache/HTMLCacheUpdate.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/includes/cache/HTMLCacheUpdate.php b/includes/cache/HTMLCacheUpdate.php
index d542800d..11e2ae74 100644
--- a/includes/cache/HTMLCacheUpdate.php
+++ b/includes/cache/HTMLCacheUpdate.php
@@ -23,8 +23,7 @@
*
* @ingroup Cache
*/
-class HTMLCacheUpdate
-{
+class HTMLCacheUpdate implements DeferrableUpdate {
/**
* @var Title
*/
@@ -33,6 +32,12 @@ class HTMLCacheUpdate
public $mTable, $mPrefix, $mStart, $mEnd;
public $mRowsPerJob, $mRowsPerQuery;
+ /**
+ * @param $titleTo
+ * @param $table
+ * @param $start bool
+ * @param $end bool
+ */
function __construct( $titleTo, $table, $start = false, $end = false ) {
global $wgUpdateRowsPerJob, $wgUpdateRowsPerQuery;
@@ -138,6 +143,9 @@ class HTMLCacheUpdate
Job::batchInsert( $jobs );
}
+ /**
+ * @return mixed
+ */
protected function insertJobs() {
$batches = $this->mCache->partition( $this->mTable, $this->mRowsPerJob );
if ( !$batches ) {
@@ -157,6 +165,7 @@ class HTMLCacheUpdate
/**
* Invalidate an array (or iterator) of Title objects, right now
+ * @param $titleArray array
*/
protected function invalidateTitles( $titleArray ) {
global $wgUseFileCache, $wgUseSquid;
@@ -179,7 +188,7 @@ class HTMLCacheUpdate
foreach ( $batches as $batch ) {
$dbw->update( 'page',
array( 'page_touched' => $timestamp ),
- array( 'page_id IN (' . $dbw->makeList( $batch ) . ')' ),
+ array( 'page_id' => $batch ),
__METHOD__
);
}
@@ -197,9 +206,9 @@ class HTMLCacheUpdate
}
}
}
-
}
+
/**
* Job wrapper for HTMLCacheUpdate. Gets run whenever a related
* job gets called from the queue.