Manual:rebuildFileCache.php
| MediaWiki file: rebuildFileCache.php | |
|---|---|
| Location: | maintenance/ |
| Source code: | master • 1.46.0 • 1.45.4 • 1.43.9 |
| Classes: | RebuildFileCache |
Details
[edit]rebuildFileCache.php is a maintenance script to build the file cache for content pages (or for all editable pages on the wiki).
$wgUseFileCache must be set to true for this script to work.
See Manual:File cache for information about which pages are and are not cached.
When a page is cached, its corresponding history page is also cached in a subdirectory of $wgFileCacheDirectory called history.
| If you are denying access to history pages via the CrawlerProtection extension, this restriction will not apply anymore once the history pages are cached by this script. The extension only prevents non-logged-in users from triggering the dynamic generation and display of history pages; once the static HTML of a history page is in the cache, it will be displayed to non-logged-in users. This can be prevented by deleting the history pages from the cache after the script is run. |
Note that the script will generate the cached files with the same owner as the user running the script. Depending on the file permissions, this may cause permission problems when viewing those pages or when those pages need to be regenerated by normal web browsing. To avoid such problems, it's recommended to run this script as the same user that runs the web server, or fix file owner and permissions once the script finishes.
Usage
[edit]Parameters
[edit]| Option/Parameter | Description |
|---|---|
| --start | Page_id to start from. |
| --end | Page_id to end on. |
| --overwrite | Refresh page cache. |
| --all | Refresh page cache in all namespaces. |