diff --git a/src/Drupal/Driver/DrushDriver.php b/src/Drupal/Driver/DrushDriver.php index 09930741..e08dfb2e 100644 --- a/src/Drupal/Driver/DrushDriver.php +++ b/src/Drupal/Driver/DrushDriver.php @@ -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()); } /**