Manual:pruneFileCache.php
MediaWiki version: | ≥ 1.19 |
MediaWiki file: pruneFileCache.php | |
---|---|
Location: | maintenance/ |
Source code: | master • 1.42.3 • 1.41.4 • 1.39.10 |
Classes: | PruneFileCache |
Details
editpruneFileCache.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
editOption | Description | Required? |
---|---|---|
--agedays | How many days old files must be in order to delete | Required |
--subdir | Prune one $wgFileCacheDirectory subdirectory name | Optional |
Usage
editphp maintenance/pruneFileCache.php --agedays days [ --subdir ]
Terminal
$ php maintenance/pruneFileCache.php --agedays 7 Pruning `/var/www/html/wiki/images/cache` directory... Done pruning `/var/www/html/wiki/images/cache` directory