Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DatabaseTableTrait.php

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\Store

Code

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();
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal