function DatabaseTableTrait::randomlyPrune
Prune the table randomly, based on GC probability.
2 calls to DatabaseTableTrait::randomlyPrune()
- DoctrineDbalStore::save in vendor/
symfony/ lock/ Store/ DoctrineDbalStore.php - Stores the resource if it's not locked by someone else.
- PdoStore::save in vendor/
symfony/ lock/ Store/ PdoStore.php - Stores the resource if it's not locked by someone else.
File
-
vendor/
symfony/ lock/ Store/ DatabaseTableTrait.php, line 69
Class
- DatabaseTableTrait
- @internal
Namespace
Symfony\Component\Lock\StoreCode
private function randomlyPrune() : void {
if ($this->gcProbability > 0 && (1.0 === $this->gcProbability || random_int(0, \PHP_INT_MAX) / \PHP_INT_MAX <= $this->gcProbability)) {
$this->prune();
}
}