8000 bug #44820 [Cache] Don't lock when doing nested computations (nicolas… · symfony/symfony@8a1c932 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8a1c932

Browse files
bug #44820 [Cache] Don't lock when doing nested computations (nicolas-grekas)
This PR was merged into the 4.4 branch. Discussion ---------- [Cache] Don't lock when doing nested computations | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #41130 | License | MIT | Doc PR | - Commits ------- be8cbd2 [Cache] Don't lock when doing nested computations
2 parents 9d8638c + be8cbd2 commit 8a1c932

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)
0