Redis
Documentation for the included Redis driver
Fully qualified name: \J0sh0nat0r\SimpleCache\Drivers\Redis
Options
host - (Required) The IP address (or FQDN) of the Redis server to connect to
port - (Optional) The port that the Redis server is listening on (default: 6379
)
password - (Optional) The password to use when authenticating with the Redis server
database - (Optional) The database number to use on the Redis server (default: 0
)
Example Options Arrays
Minimal:
<?php
$options = [
'host' => '127.0.0.1'
];
Custom Port:
<?php
$options = [
'host' => '127.0.0.1',
'port' => 6378
];
With a Password:
<?php
$options = [
'host' => '127.0.0.1',
'password' => 'super-secret-password-123'
];
With a Database:
<?php
$options = [
'host' => '127.0.0.1',
'database' => 3
];
Updated over 7 years ago