You are here

public function CacheBase::__construct in Redis 8

CacheBase constructor.

Parameters

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

\Drupal\Component\Serialization\SerializationInterface $serializer: The serialization class to use.

2 calls to CacheBase::__construct()
PhpRedis::__construct in src/Cache/PhpRedis.php
Creates a PHpRedis cache backend.
Predis::__construct in src/Cache/Predis.php
Creates a Predis cache backend.
2 methods override CacheBase::__construct()
PhpRedis::__construct in src/Cache/PhpRedis.php
Creates a PHpRedis cache backend.
Predis::__construct in src/Cache/Predis.php
Creates a Predis cache backend.

File

src/Cache/CacheBase.php, line 123

Class

CacheBase
Base class for redis cache backends.

Namespace

Drupal\redis\Cache

Code

public function __construct($bin, SerializationInterface $serializer) {
  $this->bin = $bin;
  $this->serializer = $serializer;
  $this
    ->setPermTtl();
}