Skip to content

Commit

Permalink
Merge pull request #757 from cakephp/port-756
Browse files Browse the repository at this point in the history
Port - Use rand() to trigger garbage collection
  • Loading branch information
dereuromark committed Apr 26, 2020
2 parents e98c06e + 31c3186 commit 14d6b6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Model/Table/RequestsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function findRecent(Query $query, array $options)
*/
protected function shouldGc()
{
return time() % 100 === 0;
return rand(1, 100) === 100;
}

/**
Expand Down

0 comments on commit 14d6b6b

Please sign in to comment.