手册:PruneFileCache.php
Appearance
| MediaWiki版本: | ≥ 1.19 |
| MediaWiki文件: pruneFileCache.php | |
|---|---|
| 位置: | maintenance/ |
| 源代码: | master • 1.45.1 • 1.44.3 • 1.43.6 |
| 类: | PruneFileCache |
细节
pruneFileCache.php file is a maintenance script to prune file cache for pages, objects, resources, etc.
This script requires $wgUseFileCache = true; to be set in LocalSettings.php in order to prune the file cache from $wgFileCacheDirectory.
Options/Arguments
| Option | Description | Required? |
|---|---|---|
| --agedays | How many days old files must be in order to delete | Required |
| --subdir | Prune one $wgFileCacheDirectory subdirectory name | Optional |
Usage
php maintenance/run.php pruneFileCache --agedays days [ --subdir ]
Terminal
$ php maintenance/run.php pruneFileCache --agedays 7 Pruning `/var/www/html/wiki/images/cache` directory... Done pruning `/var/www/html/wiki/images/cache` directory
在MediaWiki MediaWiki 1.39及更早版本中,您必须通过
php maintenance/脚本名称.php调用维护脚本,而不是php maintenance/run.php 脚本名称。