Skip to content

Commit 3786d4e

Browse files
bug #33842 [Cache] fix logger usage in CacheTrait::doGet() (nicolas-grekas)
This PR was merged into the 4.3 branch. Discussion ---------- [Cache] fix logger usage in CacheTrait::doGet() | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #33838 | License | MIT | Doc PR | - Commits ------- ca6515c [Cache] fix logger usage in CacheTrait::doGet()
2 parents 2c2d2ac + ca6515c commit 3786d4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Contracts/Cache/CacheTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private function doGet(CacheItemPoolInterface $pool, string $key, callable $call
5656
if ($recompute = $ctime && $expiry && $expiry <= ($now = microtime(true)) - $ctime / 1000 * $beta * log(random_int(1, PHP_INT_MAX) / PHP_INT_MAX)) {
5757
// force applying defaultLifetime to expiry
5858
$item->expiresAt(null);
59-
$this->logger && $this->logger->info('Item "{key}" elected for early recomputation {delta}s before its expiration', [
59+
$logger && $logger->info('Item "{key}" elected for early recomputation {delta}s before its expiration', [
6060
'key' => $key,
6161
'delta' => sprintf('%.1f', $expiry - $now),
6262
]);

0 commit comments

Comments
 (0)