Acquia has great Drush tools for purging Varnish caches, but just like the issues described in #2, the user experience is crappy enough that if I need to purge Varnish I just go use the UI.
In this case, the issue is just one hoop:
drush @site.env ac-domain-list to get the list of domains for an environment
drush @site.env ac-domain-purge to flush Varnish for that domain
- And then you have to iterate over the list doing purge
I'd propose doing a couple things with ac-purge:
ac-purge @site.env drupal to cc all
ac-purge @site.env memcache to determine if memcache is enabled and version 1.6 or above (via drush pmi) and then run drush @site.env mcf to flush memcache
ac-purge @site.env varnish to do the above Varnish stuff, iterate over all domains, purge Varnish for each
ac-purge @site.env cf to determine if Cloudflare is enabled, and via the CF API purge Cloudflare
ac-purge @site.env fire-bazooka to do all steps in order 1-4
For safety purposes, we may also want to check for safety variables ac-purge, ac-purge-varnish, ac-purge-memcache, etc, so sites can 'guard' against ac-purge altogether or just against specific steps of ac-purge. I could see this being needed on high-traffic sites where doing a full comprehensive cache purge tanks performance immediately.
Acquia has great Drush tools for purging Varnish caches, but just like the issues described in #2, the user experience is crappy enough that if I need to purge Varnish I just go use the UI.
In this case, the issue is just one hoop:
drush @site.env ac-domain-listto get the list of domains for an environmentdrush @site.env ac-domain-purgeto flush Varnish for that domainI'd propose doing a couple things with
ac-purge:ac-purge @site.env drupalto cc allac-purge @site.env memcacheto determine if memcache is enabled and version 1.6 or above (viadrush pmi) and then rundrush @site.env mcfto flush memcacheac-purge @site.env varnishto do the above Varnish stuff, iterate over all domains, purge Varnish for eachac-purge @site.env cfto determine if Cloudflare is enabled, and via the CF API purge Cloudflareac-purge @site.env fire-bazookato do all steps in order 1-4For safety purposes, we may also want to check for safety variables
ac-purge,ac-purge-varnish,ac-purge-memcache, etc, so sites can 'guard' against ac-purge altogether or just against specific steps of ac-purge. I could see this being needed on high-traffic sites where doing a full comprehensive cache purge tanks performance immediately.