Skip to content

Commit

Permalink
MDL-66546 caching: Improve Redis help text
Browse files Browse the repository at this point in the history
  • Loading branch information
HuongNV13 committed Nov 8, 2023
1 parent 4e112d7 commit 5e0b16f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
1 change: 0 additions & 1 deletion cache/stores/redis/addinstanceform.php
Expand Up @@ -43,7 +43,6 @@ protected function configuration_definition() {
$form->setType('server', PARAM_TEXT);
$form->addHelpButton('server', 'server', 'cachestore_redis');
$form->addRule('server', get_string('required'), 'required');
$form->addElement('static', 'server_desc', '', get_string('server_desc', 'cachestore_redis'));

$form->addElement('advcheckbox', 'encryption', get_string('encrypt_connection', 'cachestore_redis'));
$form->setType('encryption', PARAM_BOOL);
Expand Down
28 changes: 25 additions & 3 deletions cache/stores/redis/lang/en/cachestore_redis.php
Expand Up @@ -42,13 +42,35 @@
$string['serializer_igbinary'] = 'The igbinary serializer.';
$string['serializer_php'] = 'The default PHP serializer.';
$string['server'] = 'Server';
$string['server_desc'] = 'For Unix socket usage, use the format <strong>/var/redis.sock</strong> or <strong>unix:///var/redis.sock</strong>';
$string['server_help'] = 'This sets the hostname, IP address or Unix socket path of the Redis server to use.';
$string['server_help'] = 'This sets the hostname, IP address or Unix socket path of the Redis server to use.
Some example values:
* testredis.abc.com - To connect to a Redis server by hostname (Port 6379 by default).
* testredis.abc.com:1234 - To connect to a Redis server by hostname with a specific port.
* 1.2.3.4 - To connect to a Redis server by IP address (Port 6379 by default).
* 1.2.3.4:1234 - To connect to a Redis server by IP address with a specific port.
* unix:///var/redis.sock - To connect to a Redis server using a Unix socket.
* /var/redis.sock - To connect to a Redis server using a Unix socket (alternative format).
See <a href="https://redis.io/docs/reference/clients/#accepting-client-connections" target="_new">Accepting Client Connections</a> and <a href="https://redis.io/resources/clients/#php" target="_new">Redis PHP clients</a> for more information.
';
$string['password'] = 'Password';
$string['password_help'] = 'This sets the password of the Redis server.';
$string['task_ttl'] = 'Free up memory used by expired entries in Redis caches';
$string['test_server'] = 'Test server';
$string['test_server_desc'] = 'Redis server to use for testing.<br>For Unix socket usage, use the format <strong>/var/redis.sock</strong> or <strong>unix:///var/redis.sock</strong>';
$string['test_server_desc'] = 'Redis server to use for testing.
Some example values:
* testredis.abc.com - To connect to a Redis server by hostname (Port 6379 by default).
* testredis.abc.com:1234 - To connect to a Redis server by hostname with a specific port.
* 1.2.3.4 - To connect to a Redis server by IP address (Port 6379 by default).
* 1.2.3.4:1234 - To connect to a Redis server by IP address with a specific port.
* unix:///var/redis.sock - To connect to a Redis server using a Unix socket.
* /var/redis.sock - To connect to a Redis server using a Unix socket (alternative format).
See <a href="https://redis.io/docs/reference/clients/#accepting-client-connections" target="_new">Accepting Client Connections</a> and <a href="https://redis.io/resources/clients/#php" target="_new">Redis PHP clients</a> for more information.';
$string['test_password'] = 'Test server password';
$string['test_password_desc'] = 'Redis test server password.';
$string['test_serializer'] = 'Serializer';
Expand Down

0 comments on commit 5e0b16f

Please sign in to comment.