Skip to content

Commit ae189ad

Browse files
authored
Merge pull request #2708 from Instrye/patch-6
[ci skip] add caching's redis and memcached options list
2 parents 9795adb + c9c8ef1 commit ae189ad

1 file changed

Lines changed: 17 additions & 9 deletions

File tree

user_guide_src/source/libraries/caching.rst

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,14 @@ I/O will negate positive gains by caching. This requires a writable cache direct
218218
Memcached Caching
219219
=================
220220

221-
Multiple Memcached servers can be specified in the cache configuration file.
221+
Memcached servers can be specified in the cache configuration file. Available options are::
222+
223+
public $memcached = [
224+
'host' => '127.0.0.1',
225+
'port' => 11211,
226+
'weight' => 1,
227+
'raw' => false,
228+
];
222229

223230
For more information on Memcached, please see
224231
`https://www.php.net/memcached <https://www.php.net/memcached>`_.
@@ -239,15 +246,16 @@ Redis Caching
239246
Redis is an in-memory key-value store which can operate in LRU cache mode.
240247
To use it, you need `Redis server and phpredis PHP extension <https://github.com/phpredis/phpredis>`_.
241248

242-
Config options to connect to redis server must be stored in the app/Config/redis.php file.
243-
Available options are::
244-
245-
$config['host'] = '127.0.0.1';
246-
$config['password'] = NULL;
247-
$config['port'] = 6379;
248-
$config['timeout'] = 0;
249-
$config['database'] = 0;
249+
Config options to connect to redis server stored in the cache configuration file. Available options are::
250250

251+
public $redis = [
252+
'host' => '127.0.0.1',
253+
'password' => null,
254+
'port' => 6379,
255+
'timeout' => 0,
256+
'database' => 0,
257+
];
258+
251259
For more information on Redis, please see
252260
`https://redis.io <https://redis.io>`_.
253261

0 commit comments

Comments
 (0)