Skip to content

Commit

Permalink
resolve merge
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer committed Jan 17, 2024
1 parent 9cf1cbc commit 4e4f327
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/CachedKeySet.php
Expand Up @@ -212,16 +212,12 @@ private function rateLimitExceeded(): bool
}

$cacheItem = $this->cache->getItem($this->rateLimitCacheKey);
<<<<<<< Updated upstream
if (!$cacheItem->isHit()) {
$cacheItem->expiresAfter(60); // # of calls are cached each minute
=======

if (!$cacheItem->isHit() || !is_array($cacheItemData = $cacheItem->get())) {
$cacheItemData = [
'callsPerMinute' => 0,
'expiry' => new \DateTime('+60 seconds', new \DateTimeZone('UTC')),
];
>>>>>>> Stashed changes
}

if (++$cacheItemData['callsPerMinute'] > $this->maxCallsPerMinute) {
Expand Down

0 comments on commit 4e4f327

Please sign in to comment.