You are here

function expire_drush_command in Cache Expiration 6

Same name and namespace in other branches
  1. 7.2 expire.drush.inc \expire_drush_command()
  2. 7 expire.drush.inc \expire_drush_command()

Implementation of hook_drush_command().

File

./expire.drush.inc, line 12
This is the drush integration for the expire module

Code

function expire_drush_command() {
  $items['expire-url'] = array(
    'description' => "Expire fully qualified URLs.",
    'arguments' => array(
      'urls' => 'URLs to expire separated by spaces.',
    ),
    'examples' => array(
      'drush expire-url http://example.com/testpage.html' => 'Expire a single URL.',
      'drush xu http://example.com/ http://test.com/logo.jpg' => 'Expire multiple URLs.',
    ),
    'aliases' => array(
      'xu',
    ),
    'drupal dependencies' => array(
      'expire',
    ),
    'callback' => 'drush_expire_url',
  );
  $items['expire-path'] = array(
    'description' => "Expire a drupal path.",
    'arguments' => array(
      'paths' => 'A list drupal paths to expire separated by spaces.',
    ),
    'examples' => array(
      'drush expire-path node/123' => 'Expire a single drupal path.',
      'drush expire-path FRONT' => 'Expire the front page.',
      'drush xp FRONT node/234 contact' => 'Expire multiple drupal paths.',
    ),
    'aliases' => array(
      'xp',
    ),
    'drupal dependencies' => array(
      'expire',
    ),
    'callback' => 'drush_expire_path',
  );
  $items['expire-node'] = array(
    'description' => "Expire a node by node-id.",
    'arguments' => array(
      'nids' => 'Numeric node-ids to expire separated by spaces.',
    ),
    'examples' => array(
      'drush expire-node 2 24 612' => 'Expire drupal nodes by node id',
    ),
    'aliases' => array(
      'xn',
    ),
    'drupal dependencies' => array(
      'expire',
    ),
    'callback' => 'drush_expire_nid',
  );
  return $items;
}