Skip to content

Commit 30a0b01

Browse files
authored
Merge pull request #19 from byjg/5.0
Use consistent Keys for MemcachedEngine.php
2 parents 4f92e2f + ff6092b commit 30a0b01

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Psr16/MemcachedEngine.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public function __construct(?array $servers = null, $logger = null, ?array $opti
5252
protected function fixKey(string $key): string
5353
{
5454
$key = $this->getKeyFromContainer($key);
55+
$key = preg_replace('/[^A-Za-z0-9_\-]/', '-', $key);
5556
return "cache-" . $key;
5657
}
5758

0 commit comments

Comments
 (0)