MediaWiki  REL1_22
PurgeChangedPages Class Reference

Maintenance script that sends purge requests for pages edited in a date range to squid/varnish. More...

Inheritance diagram for PurgeChangedPages:
Collaboration diagram for PurgeChangedPages:

List of all members.

Public Member Functions

 __construct ()
 execute ()

Protected Member Functions

 pageableSortedRows (ResultWrapper $res, $column, $limit)
 Remove all the rows in a result set with the highest value for column $column unless the number of rows is less $limit.

Detailed Description

Maintenance script that sends purge requests for pages edited in a date range to squid/varnish.

Can be used to recover from an HTCP message partition or other major cache layer interruption.

Definition at line 36 of file purgeChangedPages.php.


Constructor & Destructor Documentation

Reimplemented from Maintenance.

Definition at line 38 of file purgeChangedPages.php.

References Maintenance\addOption(), and Maintenance\setBatchSize().


Member Function Documentation

PurgeChangedPages::pageableSortedRows ( ResultWrapper res,
column,
limit 
) [protected]

Remove all the rows in a result set with the highest value for column $column unless the number of rows is less $limit.

This returns the new array of rows and the highest value of column $column for the rows left. The ordering of rows is maintained.

This is useful for paging on mostly-unique values that may sometimes have large clumps of identical values. It should be safe to do the next query on items with a value higher than the highest of the rows returned here. If this returns an empty array for a non-empty query result, then all the rows had the same column value and the query should be repeated with a higher LIMIT.

: move this elsewhere

Parameters:
ResultWrapper$resQuery result sorted by $column (ascending)
string$column
Returns:
array (array of rows, string column value)

Definition at line 169 of file purgeChangedPages.php.

References $count, $limit, and array().

Referenced by execute().


The documentation for this class was generated from the following file: