You are here

public function PhpRedis::__construct in Redis 8

Same name in this branch
  1. 8 src/Lock/PhpRedis.php \Drupal\redis\Lock\PhpRedis::__construct()
  2. 8 src/Flood/PhpRedis.php \Drupal\redis\Flood\PhpRedis::__construct()
  3. 8 src/Queue/PhpRedis.php \Drupal\redis\Queue\PhpRedis::__construct()
  4. 8 src/Cache/PhpRedis.php \Drupal\redis\Cache\PhpRedis::__construct()
  5. 8 src/PersistentLock/PhpRedis.php \Drupal\redis\PersistentLock\PhpRedis::__construct()

Creates a PHpRedis cache backend.

Parameters

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

\Redis $client:

\Drupal\Core\Cache\CacheTagsChecksumInterface $checksum_provider:

\Drupal\redis\Cache\SerializationInterface $serializer: The serialization class to use.

Overrides CacheBase::__construct

File

src/Cache/PhpRedis.php, line 29

Class

PhpRedis
PhpRedis cache backend.

Namespace

Drupal\redis\Cache

Code

public function __construct($bin, \Redis $client, CacheTagsChecksumInterface $checksum_provider, SerializationInterface $serializer) {
  parent::__construct($bin, $serializer);
  $this->client = $client;
  $this->checksumProvider = $checksum_provider;
}