Skip to content

Commit 8d5489c

Browse files
Merge branch '3.4' into 4.4
* 3.4: Enable "native_constant_invocation" CS rule Make AbstractPhpFileCacheWarmer public
1 parent 4638bdd commit 8d5489c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CacheTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ private function doGet(CacheItemPoolInterface $pool, string $key, callable $call
4848
}
4949

5050
$item = $pool->getItem($key);
51-
$recompute = !$item->isHit() || INF === $beta;
51+
$recompute = !$item->isHit() || \INF === $beta;
5252
$metadata = $item instanceof ItemInterface ? $item->getMetadata() : [];
5353

5454
if (!$recompute && $metadata) {
5555
$expiry = $metadata[ItemInterface::METADATA_EXPIRY] ?? false;
5656
$ctime = $metadata[ItemInterface::METADATA_CTIME] ?? false;
5757

58-
if ($recompute = $ctime && $expiry && $expiry <= ($now = microtime(true)) - $ctime / 1000 * $beta * log(random_int(1, PHP_INT_MAX) / PHP_INT_MAX)) {
58+
if ($recompute = $ctime && $expiry && $expiry <= ($now = microtime(true)) - $ctime / 1000 * $beta * log(random_int(1, \PHP_INT_MAX) / \PHP_INT_MAX)) {
5959
// force applying defaultLifetime to expiry
6060
$item->expiresAt(null);
6161
$logger && $logger->info('Item "{key}" elected for early recomputation {delta}s before its expiration', [

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy