Skip to content

Commit

Permalink
pass the domain instead as its expecting full urls
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga committed May 28, 2024
1 parent eceec21 commit 2420c0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/StaticCaching/Cachers/FileCacher.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function invalidateUrl($url, $domain = null)
->getUrls($domain)
->filter(fn ($value) => $value === $url || str_starts_with($value, $url.'?'))
->each(function ($value, $key) use ($site, $domain) {
$this->writer->delete($this->getFilePath($value, $site));
$this->writer->delete($this->getFilePath($domain.$value, $site));
$this->forgetUrl($key, $domain);
});

Expand Down Expand Up @@ -164,7 +164,7 @@ public function getCachePath($site = null)
public function getFilePath($url, $site = null)
{
$urlParts = parse_url($url);
$pathParts = pathinfo($urlParts['path'] ?? $url);
$pathParts = pathinfo($urlParts['path']);
$slug = $pathParts['basename'];
$query = $this->config('ignore_query_strings') ? '' : Arr::get($urlParts, 'query', '');

Expand Down

0 comments on commit 2420c0d

Please sign in to comment.