You are here

public function PermanentDatabaseBackendFactory::get in Permanent Cache Bin 8

Same name and namespace in other branches
  1. 8.2 src/Cache/PermanentDatabaseBackendFactory.php \Drupal\pcb\Cache\PermanentDatabaseBackendFactory::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 DatabaseBackendFactory::get

File

src/Cache/PermanentDatabaseBackendFactory.php, line 15

Class

PermanentDatabaseBackendFactory
Class PermanentDatabaseBackendFactory.

Namespace

Drupal\pcb\Cache

Code

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