ProCacheStatic::clearPath()

Clear by path or wildcard path, regardless of page

Usage

// basic usage
$int = $proCacheStatic->clearPath(string $path);

// usage with all arguments
$int = $proCacheStatic->clearPath(string $path, array $options = []);

Arguments

NameType(s)Description
$pathstring

Specify exact path or wildcard path to page or URL segment to clear

  • Examples of wildcard paths: "/tours" or "boat" or "*-bike/"
$options (optional)array
  • rmdir (bool): Remove directories rather than index files? Default:false
  • getFiles (bool): Get array of files that were cleared, rather than a count? Default:false

Return value

int array

Quantity or array of files and/or directories that were removed


ProCacheStatic methods and properties

API reference based on ProcessWire core version 3.0.251