You are here

protected function RedisCacheTagsChecksum::getDatabaseConnection in Redis 8

Returns the database connection.

Return value

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

Overrides CacheTagsChecksumTrait::getDatabaseConnection

File

src/Cache/RedisCacheTagsChecksum.php, line 105

Class

RedisCacheTagsChecksum
Cache tags invalidations checksum implementation that uses redis.

Namespace

Drupal\redis\Cache

Code

protected function getDatabaseConnection() {

  // This is not injected to avoid a dependency on the database in the
  // critical path. It is only needed during cache tag invalidations.
  return \Drupal::database();
}