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;
    }