[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/maintenance/ -> purgeChangedPages.php (summary)

Send purge requests for pages edited in date range to squid/varnish.

File Size: 193 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 maintenance/Maintenance.php

Defines 1 class

PurgeChangedPages:: (3 methods):
  __construct()
  execute()
  pageableSortedRows()


Class: PurgeChangedPages  - X-Ref

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.

__construct()   X-Ref
No description

execute()   X-Ref
No description

pageableSortedRows( ResultWrapper $res, $column, $limit )   X-Ref
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.

param: ResultWrapper $res Query result sorted by $column (ascending)
param: string $column
param: int $limit
return: array (array of rows, string column value)



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1