Manual:purgeParserCache.php

From Linux Web Expert

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
<td class="mw-version-versionbox" title="<translate nowrap> The latest stable version is <tvar name=1>1.41</tvar></translate>">
<translate> ≥</translate> 1.18
<translate> MediaWiki version:</translate>

Details

purgeParserCache.php file is a maintenance script to remove old objects from the parser cache. This script only works when the parser cache is in an SQL database, by setting $wgMainCacheType or $wgParserCacheType to their appropriate values.

Options/Arguments

Option Description Required?
--expiredate Delete objects expiring before this date. The date can be specified in any format supported by the strtotime() function, like, for example, 20241224013943. <translate> Optional</translate>
--age Delete objects created more than this many seconds ago, assuming $wgParserCacheExpireTime has been consistent. <translate> Optional</translate>
--dry-run Perform a dry run, to verify age and date calculation. <translate> Optional</translate>
--msleep Milliseconds to sleep between purge chunks of $wgUpdateRowsPerQuery. <translate> Optional</translate>
--tag Purge a single server only. This feature is designed for use by large wiki farms where one has to purge multiple servers concurrently in order to keep up with new writes. This requires using the SqlBagOStuff "servers" option in $wgObjectCaches . <translate> Optional</translate>

You must specify either expiredate or age.

Usage

php maintenance/purgeParserCache.php [ --expiredate| --age | --dry-run| --msleep| --tag ]
Terminal

See also