You are here

public function DatabaseBackend::__construct in Zircon Profile 8

Same name in this branch
  1. 8 core/lib/Drupal/Core/Flood/DatabaseBackend.php \Drupal\Core\Flood\DatabaseBackend::__construct()
  2. 8 core/lib/Drupal/Core/Cache/DatabaseBackend.php \Drupal\Core\Cache\DatabaseBackend::__construct()
Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Cache/DatabaseBackend.php \Drupal\Core\Cache\DatabaseBackend::__construct()

Constructs a DatabaseBackend object.

Parameters

\Drupal\Core\Database\Connection $connection: The database connection.

\Drupal\Core\Cache\CacheTagsChecksumInterface $checksum_provider: The cache tags checksum provider.

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

File

core/lib/Drupal/Core/Cache/DatabaseBackend.php, line 54
Contains \Drupal\Core\Cache\DatabaseBackend.

Class

DatabaseBackend
Defines a default cache implementation.

Namespace

Drupal\Core\Cache

Code

public function __construct(Connection $connection, CacheTagsChecksumInterface $checksum_provider, $bin) {

  // All cache tables should be prefixed with 'cache_'.
  $bin = 'cache_' . $bin;
  $this->bin = $bin;
  $this->connection = $connection;
  $this->checksumProvider = $checksum_provider;
}