PHP code example of crazydb / yii2-redis-cluster
1. Go to this page and download the library: Download crazydb/yii2-redis-cluster library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
crazydb / yii2-redis-cluster example snippets
return [
//....
'components' => [
'redisCluster' => [
'class' => 'crazydb\redis\Connection',
'hosts' => [
'localhost:6379'
]
],
'cache' => [
'class' => 'crazydb\redis\Cache',
'redisCluster' => [
'hosts' => [
'localhost:6379'
]
]
],
'session' => [
'class' => 'crazydb\redis\Session',
'redisCluster' => [
'hosts' => [
'localhost:6379'
]
]
]
]
];