Skip to content

Commit

Permalink
[5.x] Fix fatal windows cache key error (#10667)
Browse files Browse the repository at this point in the history
  • Loading branch information
godismyjudge95 committed Aug 20, 2024
1 parent 8355891 commit 587e93b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Stache/Indexes/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,18 @@ abstract public function getItems();

public function cacheKey()
{
$searches = ['.', '/'];
$replacements = ['::', '->'];

if (windows_os()) {
$replacements[1] = '-]';
$searches[] = '->';
$replacements[] = '-]';
}

return vsprintf('stache::indexes::%s::%s', [
$this->store->key(),
str_replace(['.', '/'], $replacements, $this->name),
str_replace($searches, $replacements, $this->name),
]);
}

Expand Down

0 comments on commit 587e93b

Please sign in to comment.