public function FastlyCommands::purgeUrl in Fastly 8.3
Purge cache by Url.
@command fastly:purge:url @aliases fpurl
Parameters
string $url: A full URL to purge.
File
- src/
Commands/ FastlyCommands.php, line 63
Class
- FastlyCommands
- Provides drush commands for Fastly.
Namespace
Drupal\fastly\CommandsCode
public function purgeUrl($url = '') {
if (empty($url)) {
return;
}
if ($this->api
->purgeUrl($url)) {
$this
->output()
->writeln("<info>Successfully purged url on Fastly.</info>");
}
else {
$this
->output()
->writeln("<error>Unable to purge url on Fastly.</error>");
}
}