8000 Merge branch '4.4' into 5.3 · symfony/cache@3421462 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3421462

Browse files
Merge branch '4.4' into 5.3
* 4.4: Fix tests on PHP 8.1 [Cache] Fix memory leak [DependencyInjection] fix inlining when non-shared services are involved [DoctrineBridge] add support for the JSON type [PHPUnitBridge] Fix Uncaught ValueError [FrameworkBundle] fix registering late resettable services [Validator] Missing translations for Greek (el) translate for japanese 101,102,103 [HttpClient] Curl http client has to reinit curl multi handle on reset [Validator] Add Swedish translation for issue #43737
2 parents b57bfdc + 8d112fe commit 3421462

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Traits/AbstractAdapterTrait.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,10 @@ private function getId($key)
385385
\assert('' !== CacheItem::validateKey($key));
386386
$this->ids[$key] = $key;
387387

388+
if (\count($this->ids) > 1000) {
389+
array_splice($this->ids, 0, 500); // stop memory leak if there are many keys
390+
}
391+
388392
if (null === $this->maxIdLength) {
389393
return $this->namespace.$this->namespaceVersion.$key;
390394
}

0 commit comments

Comments
 (0)
0