public function CacheBackendFactory::get in Redis 8
Gets a cache backend class for a given cache bin.
Parameters
string $bin: The cache bin for which a cache backend object should be returned.
Return value
\Drupal\Core\Cache\CacheBackendInterface The cache backend object associated with the specified bin.
Overrides CacheFactoryInterface::get
File
- src/
Cache/ CacheBackendFactory.php, line 62
Class
- CacheBackendFactory
- A cache backend factory responsible for the construction of redis cache bins.
Namespace
Drupal\redis\CacheCode
public function get($bin) {
if (!isset($this->bins[$bin])) {
$class_name = $this->clientFactory
->getClass(ClientFactory::REDIS_IMPL_CACHE);
$this->bins[$bin] = new $class_name($bin, $this->clientFactory
->getClient(), $this->checksumProvider, $this->serializer);
}
return $this->bins[$bin];
}