public function clearCache($imagestyle_id = null)
    {
        $result = null;
        $this->hook->attach('image.style.clear.cache.before', $imagestyle_id, $result, $this);

        if (isset($result)) {
            return (bool) $result;
        }

        $result = gplcart_file_delete_recursive($this->getDirectory($imagestyle_id));
        $this->hook->attach('image.style.clear.cache.after', $imagestyle_id, $result, $this);
        return (bool) $result;
    }
public function clearCache($imagestyle_id = null)
    {
        $result = null;
        $this->hook->attach('image.style.clear.cache.before', $imagestyle_id, $result, $this);

        if (isset($result)) {
            return (bool) $result;
        }

        $result = gplcart_file_delete_recursive($this->getDirectory($imagestyle_id));
        $this->hook->attach('image.style.clear.cache.after', $imagestyle_id, $result, $this);
        return (bool) $result;
    }
public function clearCache ( $ imagestyle_id = null ) { $ result = null ; $ this -> hook -> attach ( 'image.style.clear.cache.before' , $ imagestyle_id , $ result , $ this ) ; if ( isset ( $ result ) ) { return ( bool ) $ result ; } $ result = gplcart_file_delete_recursive ( $ this -> getDirectory ( $ imagestyle_id ) ) ; $ this -> hook -> attach ( 'image.style.clear.cache.after' , $ imagestyle_id , $ result , $ this ) ; return ( bool ) $ result ; }
Removes cached files for all or a certain image style
@param integer|null $imagestyle_id
@return boolean
Removes cached files for all or a certain image style