Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit be8cbd2

Browse files
[Cache] Don't lock when doing nested computations
1 parent 9d8638c commit be8cbd2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Symfony/Component/Cache/LockRegistry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public static function compute(callable $callback, ItemInterface $item, bool &$s
8888

8989
$key = self::$files ? abs(crc32($item->getKey())) % \count(self::$files) : -1;
9090

91-
if ($key < 0 || (self::$lockedFiles[$key] ?? false) || !$lock = self::open($key)) {
91+
if ($key < 0 || self::$lockedFiles || !$lock = self::open($key)) {
9292
return $callback($item, $save);
9393
}
9494

0 commit comments

Comments
 (0)