diff --git a/src/Console/Commands/StaticClear.php b/src/Console/Commands/StaticClear.php index 98732f7812..3aaecfe94d 100644 --- a/src/Console/Commands/StaticClear.php +++ b/src/Console/Commands/StaticClear.php @@ -33,6 +33,12 @@ class StaticClear extends Command */ public function handle() { + if (! config('statamic.static_caching.strategy')) { + $this->components->error('Static caching is not enabled.'); + + return 1; + } + spin(callback: fn () => StaticCache::flush(), message: 'Clearing the static page cache...'); $this->components->info('Your static page cache is now so very, very empty.');