im working in an acquia cloud environment and currently im clearing the varnish cache via the web interface. is there a drush command to clear varnish cache while using an acquia environment.
Yep! On Acquia the command is
ac-domain-purge. Here is a snippet from the drush help available from the Acquia box.
$ drush help ac-domain-purge Purge a domain from the Varnish cache. Arguments: domain Domain name. Options: --username Acquia Cloud API username --password Acquia Cloud API password --acapi-conf-path Acquia Cloud API config files location. If not specified config will be loaded from $HOME/.drush --caller Acquia Cloud API caller name. Default is the current username. --endpoint Acquia Cloud API endpoint URL. --cainfo Path to a file containing the SSL certificates needed to verify the ac-api-endpoint. --format Format to output the object. Use "print_r" for print_r, "export" for var_export, and "json" for JSON. If not provided, the output is printed in a human-readable format.
Additionally, if you want to do this programmatically without drush, Acquia have an API endpoint for clearing the varnish cache.
There is also a module for that called appropriately "Acquia Purge". Works perfectly. Details from project page:
The Acquia Purge module allows Drupal sites hosted on Acquia Cloud to automatically purge (wipe) pages from their Varnish powered load balancers, as soon as content actually changed. The higher Drupal's "expiration of cached pages"-setting (TTL) is configured the more your site will be served directly off your load balancers. This effectively increases the efficiency of your site and lowers hardware costs, leaving more resources for back-end traffic. In most scenarios the module offers a full turn-key experience without requiring any technical configuration.
I know this doesn't answer the actual question, but its a really easy way to purge varnish cache on acquia cloud using the rules and cache expiration module as dependencies.