lithium\storage\cache\adapter\Redis::__construct PHP Method

__construct() public method

Constructor.
See also: lithium\storage\Cache::config()
See also: lithium\storage\cache\adapter\Redis::write()
public __construct ( array $config = [] ) : void
$config array Configuration for this cache adapter. These settings are queryable through `Cache::config('name')`. The available options are as follows: - `'scope'` _string_: Scope which will prefix keys; per default not set. - `'expiry'` _mixed_: The default expiration time for cache values, if no value is otherwise set. Can be either a `strtotime()` compatible tring or TTL in seconds. To indicate items should not expire use `Cache::PERSIST`. Defaults to `+1 hour`. - `'host'` _string_: A string in the form of `'host:port'` indicating the Redis server to connect to. Defaults to `'127.0.0.1:6379'`. - `'persistent'` _boolean_: Indicates whether the adapter should use a persistent connection when attempting to connect to the Redis server. If `true`, it will attempt to reuse an existing connection when connecting, and the connection will not close when the request is terminated. Defaults to `false`.
return void
    public function __construct(array $config = array())
    {
        $defaults = array('host' => '127.0.0.1:6379', 'scope' => null, 'expiry' => '+1 hour', 'persistent' => false);
        parent::__construct($config + $defaults);
    }