diff --git a/.github/workflows/security-standards.yml b/.github/workflows/security-standards.yml index 61b240c..445cd42 100644 --- a/.github/workflows/security-standards.yml +++ b/.github/workflows/security-standards.yml @@ -31,6 +31,7 @@ jobs: enable_postgres_service: true enable_mysql_service: true enable_scylladb_service: true + enable_elasticsearch_service: false enable_mongodb_service: true service_db_name: "cachelayer" service_db_user: "cachelayer" diff --git a/src/Cache/Adapter/ApcuCacheAdapter.php b/src/Cache/Adapter/ApcuCacheAdapter.php index cb3fece..fe3685d 100644 --- a/src/Cache/Adapter/ApcuCacheAdapter.php +++ b/src/Cache/Adapter/ApcuCacheAdapter.php @@ -169,7 +169,7 @@ protected function supportsItem(CacheItemInterface $item): bool private function appendFetchedHit(array &$items, array &$stale, string $key, array $raw): bool { $mapped = $this->map($key); - if (!array_key_exists($mapped, $raw) || !is_string($raw[$mapped])) { + if (!isset($raw[$mapped]) || !is_string($raw[$mapped])) { return false; } diff --git a/src/Memoize/OnceMemoizer.php b/src/Memoize/OnceMemoizer.php index bed544f..d3ef410 100644 --- a/src/Memoize/OnceMemoizer.php +++ b/src/Memoize/OnceMemoizer.php @@ -117,10 +117,6 @@ private function normalizeCallerFunction(string $callerFunction): string private function trackCacheKey(string $key): void { - if (in_array($key, $this->order, true)) { - return; - } - $this->order[] = $key; if (count($this->order) <= self::LIMIT) { return; diff --git a/tests/Cache/ApcuCachePoolTest.php b/tests/Cache/ApcuCachePoolTest.php index a00c4f9..93f2954 100644 --- a/tests/Cache/ApcuCachePoolTest.php +++ b/tests/Cache/ApcuCachePoolTest.php @@ -1,5 +1,7 @@