You are here

function varnish_drush_command in Varnish 6

Same name and namespace in other branches
  1. 7 varnish.drush.inc \varnish_drush_command()

Implementation of hook_drush_command().

File

./varnish.drush.inc, line 12
This file contains drush integration for the varnish module.

Code

function varnish_drush_command() {
  $items = array();
  $items['varnish-purge-all'] = array(
    'description' => 'Purge all pages in varnish.',
    'drupal dependencies' => array(
      'varnish',
    ),
    'aliases' => array(
      'vpa',
    ),
    'callback' => 'varnish_purge_all_pages',
  );
  $items['varnish-purge'] = array(
    'description' => "Purge a list of URLs in varnish.",
    'arguments' => array(
      'paths' => 'A list of paths to purge separated by spaces. Regular expressions allowed.',
    ),
    'aliases' => array(
      'vp',
    ),
    'drupal dependencies' => array(
      'varnish',
    ),
    'callback' => 'varnish_drush_purge',
  );
  return $items;
}