From 6507b1bceeb8c657f21923801ec59aaf7a976d49 Mon Sep 17 00:00:00 2001 From: Luke Bainbridge Date: Fri, 3 May 2024 08:11:25 -0400 Subject: [PATCH] Allow capital letters in cache keys. (#46) --- src/Cache/Pool/AbstractCachePool.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cache/Pool/AbstractCachePool.php b/src/Cache/Pool/AbstractCachePool.php index 9b7eb3d..17ab0d0 100644 --- a/src/Cache/Pool/AbstractCachePool.php +++ b/src/Cache/Pool/AbstractCachePool.php @@ -14,7 +14,7 @@ abstract class AbstractCachePool implements CacheItemPoolInterface protected function checkKey(mixed $key) { - if (!is_string($key) || preg_match('/^[a-z0-9-._]+$/', $key) === 0 || strlen($key) > 128) { + if (!is_string($key) || preg_match('/^[A-Za-z0-9-._]+$/', $key) === 0 || strlen($key) > 128) { throw new InvalidArgumentException(); } }