Skip to content

Commit 14d6b6b

Browse files
authored
Merge pull request #757 from cakephp/port-756
Port - Use rand() to trigger garbage collection
2 parents e98c06e + 31c3186 commit 14d6b6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Model/Table/RequestsTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function findRecent(Query $query, array $options)
8383
*/
8484
protected function shouldGc()
8585
{
86-
return time() % 100 === 0;
86+
return rand(1, 100) === 100;
8787
}
8888

8989
/**

0 commit comments

Comments
 (0)