protected function PermanentRedisBackendTest::createCacheBackend in Permanent Cache Bin 8
Creates a new instance of PhpRedis permanent cache backend.
Return value
\Drupal\pcb_redis\Cache\PermanentRedisBackend A new PhpRedis cache backend.
Overrides GenericCacheBackendUnitTestBase::createCacheBackend
File
- modules/
pcb_redis/ tests/ src/ Kernel/ PermanentRedisBackendTest.php, line 34
Class
- PermanentRedisBackendTest
- Tests the PermanentRedisBackendTest.
Namespace
Drupal\Tests\pcb_redis\KernelCode
protected function createCacheBackend($bin) {
$cache = \Drupal::service('cache.backend.permanent_redis')
->get($bin);
$cache
->setMinTtl(10);
return $cache;
}