Skip to content

Commit 8464bd0

Browse files
author
Felix Marezki
committed
HttpCache lock update
1 parent 11aff9a commit 8464bd0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
3636
private $traces = array();
3737

3838
/**
39+
* Constructor
40+
*
3941
* The available options are:
4042
*
4143
* * debug: If true, the traces are added as a HTTP header to ease debugging
@@ -702,11 +704,11 @@ private function mayServeStaleWhileRevalidate(Response $entry)
702704
private function waitForLock(Request $request)
703705
{
704706
$wait = 0;
705-
while ($this->store->isLocked($request) && $wait < 5000000) {
707+
while ($this->store->isLocked($request) && $wait < 100) {
706708
usleep(50000);
707-
$wait += 50000;
709+
++$wait;
708710
}
709711

710-
return $wait < 5000000;
712+
return $wait < 100;
711713
}
712714
}

0 commit comments

Comments
 (0)