You are here

public function Predis::__construct in Redis 8

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

Creates a Predis 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/Predis.php, line 29

Class

Predis
Predis cache backend.

Namespace

Drupal\redis\Cache

Code

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