ProCacheStaticClear::cacheMaintenance() method

Cache maintenance to clear out cache files and DB entries have have expired

This is run by ProCache every 30 seconds

Usage

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

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

Arguments

NameType(s)Description
$options (optional)array
  • `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' => 3600 ] where 3600 is cache time in seconds

Return value

int array

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


$clear methods and properties

API reference based on ProcessWire core version 3.0.252