Skip to content

Commit

Permalink
Merge pull request #198 from greg-1-anderson/cr-for-9
Browse files Browse the repository at this point in the history
Use cache:rebuild instead of cache-clear all with Drush 9.
  • Loading branch information
jhedstrom committed Sep 21, 2018
2 parents 22ee1f3 + ab9f066 commit e8ce2bb
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Drupal/Driver/DrushDriver.php
Expand Up @@ -226,8 +226,17 @@ public function fetchWatchdog($count = 10, $type = NULL, $severity = NULL) {
* {@inheritdoc}
*/
public function clearCache($type = 'all') {
$type = array($type);
return $this->drush('cache-clear', $type, array());
if (self::$isLegacyDrush) {
$type = array($type);
return $this->drush('cache-clear', $type, array());
}
if (($type == 'all') || ($type == 'drush')) {
$this->drush('cache-clear', array('drush'), array());
if ($type == 'drush') {
return;
}
}
return $this->drush('cache:rebuild', $type, array());
}

/**
Expand Down

0 comments on commit e8ce2bb

Please sign in to comment.