DatabaseBackend::__construct

public DatabaseBackend::__construct(Connection $connection, CacheTagsChecksumInterface $checksum_provider, $bin)

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 49

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;
}
doc_Drupal
2016-10-29 08:59:40
Comments
Leave a Comment

Please login to continue.