MediaWiki 1.43.1
PurgeChangedPages Class Reference

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

Inherits Maintenance.

Collaboration diagram for PurgeChangedPages:

Public Member Functions

 __construct ()
 
 execute ()
 

Protected Member Functions

 pageableSortedRows (IResultWrapper $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 40 of file purgeChangedPages.php.

Constructor & Destructor Documentation

◆ __construct()

PurgeChangedPages::__construct ( )

Definition at line 42 of file purgeChangedPages.php.

Member Function Documentation

◆ execute()

PurgeChangedPages::execute ( )

Definition at line 54 of file purgeChangedPages.php.

References $wgHTCPRouting, and pageableSortedRows().

◆ pageableSortedRows()

PurgeChangedPages::pageableSortedRows ( IResultWrapper $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.

Todo
move this elsewhere
Parameters
IResultWrapper$resQuery result sorted by $column (ascending)
string$column
int$limit
Returns
array (array of rows, string column value)

Definition at line 168 of file purgeChangedPages.php.

Referenced by execute().


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