Skip to content

Commit e0eb32c

Browse files
committed
Changed lockExists to isLocked, fixed indentation.
1 parent 4e9caef commit e0eb32c

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ protected function lock(Request $request, Response $entry)
515515

516516
// wait for the lock to be released
517517
$wait = 0;
518-
while ($this->store->lockExists($request) && $wait < 5000000) {
518+
while ($this->store->isLocked($request) && $wait < 5000000) {
519519
usleep(50000);
520520
$wait += 50000;
521521
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ public function unlock(Request $request)
9797
return @unlink($this->getPath($this->getCacheKey($request).'.lck'));
9898
}
9999

100-
public function lockExists(Request $request)
100+
public function isLocked(Request $request)
101101
{
102-
return is_file($this->getPath($this->getCacheKey($request).'.lck'));
102+
return is_file($this->getPath($this->getCacheKey($request).'.lck'));
103103
}
104104

105105
/**

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function unlock(Request $request);
7676
*
7777
* @return Boolean true if lock exists, false otherwise
7878
*/
79-
public function lockExists(Request $request);
79+
public function isLocked(Request $request);
8080

8181
/**
8282
* Purges data for the given URL.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,10 @@ public function testLocking()
200200
$this->assertTrue($this->store->lock($req));
201201

202202
$path = $this->store->lock($req);
203-
$this->assertTrue($this->store->lockExists($req));
203+
$this->assertTrue($this->store->isLocked($req));
204204

205205
$this->store->unlock($req);
206-
$this->assertFalse($this->store->lockExists($req));
206+
$this->assertFalse($this->store->isLocked($req));
207207
}
208208

209209
protected function storeSimpleEntry($path = null, $headers = array())

0 commit comments

Comments
 (0)