Flush varnish cache, work with extension Phoenix_VarnishCache

Use method clean() from class Phoenix_VarnishCache_Model_Control for flush varnich cache, more info you can see in this class.

  
    /**
     * Flush all varnish cache
     * 
     * @var cache Phoenix_VarnishCache_Model_Control
     */
    try {
        $cache = Mage::getSingleton('varnishcache/control');
        if ($cache) {
            $cache->clean(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
        }
        
    } catch (Exception $exc) {
        Mage::log($exc->getTraceAsString(), null, __METHOD__.'__ERR.log', true);
    }