Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 534 Bytes

class-redis-cache-engine.md

File metadata and controls

31 lines (19 loc) · 534 Bytes

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));