WP_CLI
FileCache::clear
Remove all cached files.
Method of the class: FileCache{}
No Hooks.
Returns
true|false.
Usage
$FileCache = new FileCache(); $FileCache->clear();
FileCache::clear() FileCache::clear code WP-CLI 2.13.0-alpha
public function clear() {
if ( ! $this->enabled ) {
return false;
}
$finder = $this->get_finder();
foreach ( $finder as $file ) {
unlink( $file->getRealPath() );
}
return true;
}