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

Breadcrumb

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

function PdoSessionHandler::gc

File

vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php, line 303

Class

PdoSessionHandler
Session handler using a PDO connection to read and write data.

Namespace

Symfony\Component\HttpFoundation\Session\Storage\Handler

Code

public function gc(int $maxlifetime) : int|false {
    // We delay gc() to close() so that it is executed outside the transactional and blocking read-write process.
    // This way, pruning expired sessions does not block them from being started while the current session is used.
    $this->gcCalled = true;
    return 0;
}

API Navigation

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