Skip to content

Commit f97569f

Browse files
committed
Update README.md
1 parent b1784a1 commit f97569f

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

README.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -240,17 +240,31 @@ add or remove code in the ```./webserver/templates/nginx.conf.template``` file f
240240

241241
#### Redis
242242

243-
[Redis Cache](https://codeigniter.com/userguide3/libraries/caching.html#redis-caching), Config options to connect to redis server must be stored in the application/config/redis.php file.
243+
[Redis Cache](https://codeigniter.com/user_guide/libraries/caching.html?highlight=cache#redis-caching), Config options to connect to redis server stored in the cache configuration file.
244244

245245
Available options are:
246246

247247
```
248-
$config['socket_type'] = 'tcp'; //`tcp` or `unix`
249-
$config['socket'] = '/var/run/redis.sock'; // in case of `unix` socket type
250-
$config['host'] = 'redis';
251-
$config['password'] = NULL;
252-
$config['port'] = 6379;
253-
$config['timeout'] = 0;
248+
<?php
249+
250+
namespace Config;
251+
252+
use CodeIgniter\Config\BaseConfig;
253+
254+
class Cache extends BaseConfig
255+
{
256+
// ...
257+
258+
public $redis = [
259+
'host' => 'redis',
260+
'password' => null,
261+
'port' => 6379,
262+
'timeout' => 0,
263+
'database' => 0,
264+
];
265+
266+
// ...
267+
}
254268
```
255269

256270
#### Cache

0 commit comments

Comments
 (0)