WP_CLI
FileCache::remove
Remove file from cache
Method of the class: FileCache{}
No Hooks.
Returns
true|false.
Usage
$FileCache = new FileCache(); $FileCache->remove( $key );
- $key(string) (required)
- cache key.
FileCache::remove() FileCache::remove code WP-CLI 2.13.0-alpha
public function remove( $key ) {
if ( ! $this->enabled ) {
return false;
}
$filename = $this->filename( $key );
if ( file_exists( $filename ) ) {
return unlink( $filename );
}
return false;
}