Skip to content

Commit

Permalink
Fix compatibility with Nette/Caching v3.1.3 (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubenglicky committed Jun 8, 2022
1 parent 4c4a02a commit 4adbab1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Caching/PhpFileStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class PhpFileStorage extends \Nette\Caching\Storages\FileStorage implements \Net
private const FILE = 'file';
private const HANDLE = 'handle';

private const NS_SEPARATOR = "\x00";

/**
* Reads cache data from disk.
*
Expand All @@ -54,7 +56,7 @@ protected function getCacheFile(string $key): string
$cacheKey = substr_replace(
$key,
trim(strtr($this->hint, '\\/@', '.._'), '.') . '-',
strpos($key, Cache::NAMESPACE_SEPARATOR) + 1,
strpos($key, self::NS_SEPARATOR) + 1,
0
);

Expand Down

0 comments on commit 4adbab1

Please sign in to comment.