I was wondering why "drush cc all" did not purge the site from Varnish. Then found "drush varnish-purge-all", and it did not do anything either. Both were just quietly failing.
The reason is that drush does not know your base_url and sets it to http://default if not spesified using --uri/-l, or $base_url is set in settings.php.
I don't know if this is obvious to every drush user, so it might be an idea to have varnish-purge-all warn the user if $base_url is set to http://default? And/or include this in the documentation.
Both of these work flawlessly:
drush cc all --uri=http://domain.tld
drush varnish-purge-all --uri=http://domain.tld
Atle
Comments
Comment #1
DamienMcKennaIn that case, it should fail if it cannot work out the correct hostname.
Comment #2
DamienMcKennaClarifying the title.
Comment #3
tahiche CreditAttribution: tahiche commentedSo glad i found this post. This was a tricky one.
Varnish was being purged when clicking the "Clear Cache" button at /performance page but not through "drush cc all".
So the UI Cache Clear is probably using $base_url and Drush is trying to clear Varnish at http://default.
It should certainly display a warning.
Comment #4
MiSc CreditAttribution: MiSc commentedThis should be solved by using a drush alias, closing this.