Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c978c6e

Browse files
committedJan 4, 2021
fix memached edge case
1 parent 31b60d0 commit c978c6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/ApiCache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ private function formatRemediationFromDecision(?array $decision): array
213213
$duration = time() + $this->cacheExpirationForCleanIp;
214214
if (!$this->liveMode) {
215215
// In stream mode we considere an clean IP forever... until the next resync.
216-
$duration = \PHP_INT_MAX;
216+
$duration = 315360000; // in this case, forever is 10 years as PHP_INT_MAX will cause trouble with the Memcached Adapter (int to float unwanted conversion)
217217
}
218218

219219
return [Constants::REMEDIATION_BYPASS, $duration, 0];

0 commit comments

Comments
 (0)
Please sign in to comment.