WP_CLI

FileCache::clear()publicWP-CLI 1.0

Remove all cached files.

Method of the class: FileCache{}

No Hooks.

Return

true|false.

Usage

$FileCache = new FileCache();
$FileCache->clear();

FileCache::clear() code WP-CLI 2.8.0-alpha

public function clear() {
	if ( ! $this->enabled ) {
		return false;
	}

	$finder = $this->get_finder();

	foreach ( $finder as $file ) {
		unlink( $file->getRealPath() );
	}

	return true;
}