Skip to content

Commit e0da8e9

Browse files
committed
Remove useless expiration condition in cache increment
1 parent 087e8fd commit e0da8e9

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/Cache/MongoStore.php

-3
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,9 @@ public function get($key): mixed
182182
#[Override]
183183
public function increment($key, $value = 1): int|float|false
184184
{
185-
$this->forgetIfExpired($key);
186-
187185
$result = $this->collection->findOneAndUpdate(
188186
[
189187
'_id' => $this->prefix . $key,
190-
'expiration' => ['$gte' => $this->getUTCDateTime()],
191188
],
192189
[
193190
'$inc' => ['value' => $value],

0 commit comments

Comments
 (0)