Skip to main content

Class RedisCacheEngine

This class uses the Redis as the cache engine.

Defining the Servers

The constructor expects a string with the server and port.

$server = 'localhost:5678'

PSR-16 Constructor

$cache = new \ByJG\Cache\Psr16\RedisCacheEngine($server, $password)

PSR-6 Constructor

$cachePool = \ByJG\Cache\Factory::createRedisCacheEngine($server, $password)

or

$cachePool = new \ByJG\Cache\Psr6\CachePool(new \ByJG\Cache\Psr16\RedisCacheEngine($server, $password));