Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 132bba6

Browse filesBrowse files
committed
[Cache][WebProfiler] fix collecting cache stats with sub-requests + allow clearing calls
1 parent 020664e commit 132bba6
Copy full SHA for 132bba6

File tree

2 files changed

+7
-7
lines changed
Filter options

2 files changed

+7
-7
lines changed

‎src/Symfony/Component/Cache/Adapter/TraceableAdapter.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Adapter/TraceableAdapter.php
+6-5Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,12 @@ public function reset()
204204

205205
public function getCalls()
206206
{
207-
try {
208-
return $this->calls;
209-
} finally {
210-
$this->calls = array();
211-
}
207+
return $this->calls;
208+
}
209+
210+
public function clearCalls()
211+
{
212+
$this->calls = array();
212213
}
213214

214215
protected function start($name)

‎src/Symfony/Component/Cache/DataCollector/CacheDataCollector.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/DataCollector/CacheDataCollector.php
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ public function reset()
5757
{
5858
$this->data = array();
5959
foreach ($this->instances as $instance) {
60-
// Calling getCalls() will clear the calls.
61-
$instance->getCalls();
60+
$instance->clearCalls();
6261
}
6362
}
6463

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.