$procachecacheMaintenance()

Run cache maintenance

This cleans out cache files and entries that have expired. This automatically runs every 30 seconds, when possible to do so.

Usage

// basic usage
$int = $procache->cacheMaintenance();

// usage with all arguments
$int = $procache->cacheMaintenance(array $options = []);

Arguments

NameType(s)Description
$options (optional)array

Options to modify behavior:

  • `testMode (bool): Enable test mode where nothing real is deleted? (best combined with getFiles)
  • getFiles (bool): Get deleted files? Default:false
  • cacheTimes (array): Substitute cache times, array of [ 'template_name' => 12345 ] where 12345 is cache time.

Return value

int array

Number of cache files removed or array of files removed if getFiles is true.


$procache methods and properties

API reference based on ProcessWire core version 3.0.252