Manual:purgePage.php
Appearance
| MediaWiki バージョン: | ≧ 1.30 |
| MediaWiki ファイル: purgePage.php | |
|---|---|
| 場所: | maintenance/ |
| ソース コード: | master • 1.44.2 • 1.43.5 • 1.39.15 |
| クラス: | PurgePage |
詳細
purgePage.php file is a maintenance script to purge both internal and external caches.
This is the equivalent to action=purge (T169195) and performs the following actions:
- Re-parses the wikitext, saves changes to the database (e.g. current expansion of magic words and templates, writes links to the database for images, links-here, categories etc.).
- Performs a database write for page.page_touched to the current time, which has potential cascading effects to other areas of the application.
- Purges the page's canonical URLs from File cache (
$wgUseFileCache) and/or from external Squid/Varnish proxy (this is the part that purgeList.php does). - In addition, individual page types (such as FilePage) and extensions, may register additional actions. For example, when purging a File page, it also deletes thumbnails from Swift storage, and purge the URLs of all thumbnail sizes and variations (page1, page2, 120px, 320px etc. etc.)
オプション/引数
| オプション | 説明 | 必須かどうか |
|---|---|---|
| --skip-exists-check | Skip page existence check | 省略可能 |
使用法
php maintenance/run.php purgePage [ --skip-exists-check ]
MediaWiki バージョン 1.39.15 以前では、メンテナンス スクリプトを
php maintenance/run.php スクリプト名 ではなく php maintenance/スクリプト名.php を使用して実行する必要があります。Give a list of page titles to purge, one per line, from standard input:
Terminal
$ php maintenance/run.php purgePage Page 1 Purged Page 1 Main page Page doesn't exist Main Page Purged Main Page
Give a list of page titles to purge, one per line, from a file:
Terminal
$ php maintenance/run.php purgePage < purge.txt Purged Page 1 Page doesn't exist Purged Main Page
where purge.txt contains a list of pagenames to be regenerated.