diff --git a/src/Console/ClearCacheCommand.php b/src/Console/ClearCacheCommand.php index d254bed..d8d648b 100644 --- a/src/Console/ClearCacheCommand.php +++ b/src/Console/ClearCacheCommand.php @@ -56,7 +56,10 @@ public function fire() $driverConfig = $configure['aop'][$configure['default']]; if (isset($driverConfig['cacheDir'])) { - $this->filesystem->deleteDirectory($driverConfig['cacheDir']); + $compileCaches = $this->filesystem->glob($driverConfig['cacheDir'] . '/*'); + foreach ($compileCaches as $file) { + $this->filesystem->deleteDirectory($file); + } } $this->info('aspect/annotation cache clear!'); }