function DatabaseBackendFactory::get

Same name in other branches
  1. 9 core/lib/Drupal/Core/Cache/DatabaseBackendFactory.php \Drupal\Core\Cache\DatabaseBackendFactory::get()
  2. 8.9.x core/lib/Drupal/Core/Cache/DatabaseBackendFactory.php \Drupal\Core\Cache\DatabaseBackendFactory::get()
  3. 10 core/lib/Drupal/Core/Cache/DatabaseBackendFactory.php \Drupal\Core\Cache\DatabaseBackendFactory::get()

Gets DatabaseBackend for the specified cache bin.

Parameters

$bin: The cache bin for which the object is created.

Return value

\Drupal\Core\Cache\DatabaseBackend The cache backend object for the specified cache bin.

Overrides CacheFactoryInterface::get

File

core/lib/Drupal/Core/Cache/DatabaseBackendFactory.php, line 62

Class

DatabaseBackendFactory

Namespace

Drupal\Core\Cache

Code

public function get($bin) {
    $max_rows = $this->getMaxRowsForBin($bin);
    return new DatabaseBackend($this->connection, $this->checksumProvider, $bin, $this->serializer, $this->time, $max_rows);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.