Skip to content

Commit 0c637e7

Browse files
authored
Do not invalidate cache from disabled stores (#142)
1 parent fab6ccd commit 0c637e7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/Commands/InvalidateCacheCommand.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ public function handle(Cacher $cacher, Writer $writer): void
2828

2929
foreach ($stores as $store) {
3030
$staticCachePathConfig = 'statamic.static_caching.strategies.full.path';
31+
$isDisabled = config('rapidez.statamic.sites.' . $store['code'] . '.attributes.disabled');
32+
33+
if ($isDisabled === true) {
34+
continue;
35+
}
36+
3137
Rapidez::setStore($store);
3238

3339
if (is_array(config('statamic.static_caching.strategies.full.path'))) {

0 commit comments

Comments
 (0)