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

Skip to content

Commit 7341375

Browse files
committed
Make sure we count hits/reads from hasItem
1 parent 357b552 commit 7341375

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,10 @@ private function calculateStatistics()
133133
$statistics[$name]['misses'] += $count - $call->misses;
134134
} elseif ($call->name === 'hasItem') {
135135
$statistics[$name]['reads'] += 1;
136-
if ($call->result === false) {
136+
if ($call->result->getRawData()[0][0] === false) {
137137
$statistics[$name]['misses'] += 1;
138+
} else {
139+
$statistics[$name]['hits'] += 1;
138140
}
139141
} elseif ($call->name === 'save') {
140142
$statistics[$name]['writes'] += 1;

0 commit comments

Comments
 (0)