You are here

public function TrafficRegistry::clear in URLs queuer 8

Wipe out all gathered traffic information.

Overrides TrafficRegistryInterface::clear

File

src/TrafficRegistry.php, line 80

Class

TrafficRegistry
Provides a database-driven traffic registry with URLs and tags.

Namespace

Drupal\purge_queuer_url

Code

public function clear() {
  if ($this->connection
    ->schema()
    ->tableExists('purge_queuer_url')) {
    $this->connection
      ->delete('purge_queuer_url')
      ->execute();
  }
  if ($this->connection
    ->schema()
    ->tableExists('purge_queuer_url_tag')) {
    $this->connection
      ->delete('purge_queuer_url_tag')
      ->execute();
  }
}