Extends
lithium\core\Object
Object constructor
Instantiates the `Redis` object and connects it to the configured server.
Parameters
- array $config Configuration parameters for this cache adapter. These settings are indexed by name and queryable through `Cache::config('name')`. The available settings for this adapter are as follows: - `'host'` _string_: A string in the form of `'host:port'` indicating the Redis server to connect to. Defaults to `'127.0.0.1:6379'`. - `'expiry'` _mixed_: Default expiration for cache values written through this adapter. Defaults to `'+1 hour'`. For acceptable values, see the `$expiry` parameter of `Redis::_ttl()`. - `'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`.
Source
public function __construct(array $config = array()) {
$defaults = array(
'host' => '127.0.0.1:6379',
'expiry' => '+1 hour',
'persistent' => false
);
parent::__construct($config + $defaults);
}