Skip to content

Commit

Permalink
Fix clearing cache
Browse files Browse the repository at this point in the history
  • Loading branch information
HeahDude committed Nov 16, 2023
1 parent 526c98e commit 406a1c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/CacheWarmer/SerializerCacheWarmer.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ public function __construct(array $paths, array $profiles, HTMLPurifiersRegistry
public function warmUp($cacheDir): array
{
foreach ($this->paths as $path) {
$this->filesystem->remove($path); // clean previous cache
if ($this->filesystem->exists($path)) {
$this->filesystem->remove($path); // clean previous cache
}

$this->filesystem->mkdir($path);
}

Expand Down

0 comments on commit 406a1c5

Please sign in to comment.