Skip to content

Commit 31c3186

Browse files
garasothercorey
authored andcommitted
Use rand() to trigger garbage collection
1 parent e98c06e commit 31c3186

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)