public function DatabaseBackend::__construct

Same name in this branch
  1. 9.x drupal/core/lib/Drupal/Core/Cache/DatabaseBackend.php \Drupal\Core\Cache\DatabaseBackend::__construct()
  2. 9.x drupal/core/lib/Drupal/Core/Flood/DatabaseBackend.php \Drupal\Core\Flood\DatabaseBackend::__construct()

Constructs a DatabaseBackend object.

Parameters

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

File

drupal/core/lib/Drupal/Core/Cache/DatabaseBackend.php, line 33
Definition of Drupal\Core\Cache\DatabaseBackend.

Class

DatabaseBackend
Defines a default cache implementation.

Namespace

Drupal\Core\Cache

Code

public function __construct($bin) {

  // All cache tables should be prefixed with 'cache_', except for the
  // default 'cache' bin.
  if ($bin != 'cache') {
    $bin = 'cache_' . $bin;
  }
  $this->bin = $bin;
}