Redaxscript\Cache::clear PHP Method

clear() public method

clear the cache
Since: 3.0.0
public clear ( mixed $bundle = null ) : Cache
$bundle mixed key or collection of the bundle
return Cache
    public function clear($bundle = null)
    {
        $cacheDirectory = new Directory();
        $cacheDirectory->init($this->_directory);
        if ($bundle) {
            $file = $this->_getFile($bundle);
            $cacheDirectory->remove($file);
        } else {
            $cacheDirectory->clear();
        }
        return $this;
    }