Skip to content

Commit f929bd3

Browse files
committed
minor #21009 [Cache][Lock] Add support for Relay\Cluster in docs (javiereguiluz)
This PR was squashed before being merged into the 7.3 branch. Discussion ---------- [Cache][Lock] Add support for `Relay\Cluster` in docs Fixes #20709 Commits ------- c1b44e7 [Cache][Lock] Add support for `Relay\Cluster` in docs
2 parents 8eeecb8 + c1b44e7 commit f929bd3

File tree

2 files changed

+37
-5
lines changed

2 files changed

+37
-5
lines changed

components/cache/adapters/redis_adapter.rst

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ to utilize a cluster of servers to provide redundancy and/or fail-over is also a
2020

2121
**Requirements:** At least one `Redis server`_ must be installed and running to use this
2222
adapter. Additionally, this adapter requires a compatible extension or library that implements
23-
``\Redis``, ``\RedisArray``, ``RedisCluster``, ``\Relay\Relay`` or ``\Predis``.
23+
``\Redis``, ``\RedisArray``, ``RedisCluster``, ``\Relay\Relay``, ``\Relay\Cluster`` or ``\Predis``.
2424

25-
This adapter expects a `Redis`_, `RedisArray`_, `RedisCluster`_, `Relay`_ or `Predis`_ instance to be
25+
This adapter expects a `Redis`_, `RedisArray`_, `RedisCluster`_, `Relay`_, `RelayCluster`_ or `Predis`_ instance to be
2626
passed as the first parameter. A namespace and default cache lifetime can optionally be passed
2727
as the second and third parameters::
2828

@@ -48,6 +48,10 @@ as the second and third parameters::
4848
?MarshallerInterface $marshaller = null
4949
);
5050

51+
.. versionadded:: 7.3
52+
53+
Support for ``Relay\Cluster`` was introduced in Symfony 7.3.
54+
5155
Configure the Connection
5256
------------------------
5357

@@ -226,11 +230,34 @@ Available Options
226230
``ssl`` (type: ``array``, default: ``null``)
227231
SSL context options. See `php.net/context.ssl`_ for more information.
228232

233+
``relay_cluster_context`` (type: ``array``, default: ``[]``)
234+
Defines configuration options specific to ``\Relay\Cluster``. For example, to
235+
user a self-signed certificate for testing in local environment::
236+
237+
$options = [
238+
// ...
239+
'relay_cluster_context' => [
240+
// ...
241+
'stream' => [
242+
'verify_peer' => false,
243+
'verify_peer_name' => false,
244+
'allow_self_signed' => true,
245+
'local_cert' => '/valkey.crt',
246+
'local_pk' => '/valkey.key',
247+
'cafile' => '/valkey.crt',
248+
],
249+
],
250+
];
251+
229252
.. versionadded:: 7.1
230253

231254
The option ``sentinel_master`` as an alias for ``redis_sentinel`` was introduced
232255
in Symfony 7.1.
233256

257+
.. versionadded:: 7.3
258+
259+
The ``relay_cluster_context`` option was introduced in Symfony 7.3.
260+
234261
.. note::
235262

236263
When using the `Predis`_ library some additional Predis-specific options are available.
@@ -359,6 +386,7 @@ Supports key rotation, ensuring secure decryption with both old and new keys::
359386
.. _`RedisArray`: https://github.com/phpredis/phpredis/blob/develop/arrays.md
360387
.. _`RedisCluster`: https://github.com/phpredis/phpredis/blob/develop/cluster.md
361388
.. _`Relay`: https://relay.so/
389+
.. _`RelayCluster`: https://relay.so/docs/1.x/connections#cluster
362390
.. _`Predis`: https://packagist.org/packages/predis/predis
363391
.. _`Predis Connection Parameters`: https://github.com/nrk/predis/wiki/Connection-Parameters#list-of-connection-parameters
364392
.. _`TCP-keepalive`: https://redis.io/topics/clients#tcp-keepalive

components/lock.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,9 +612,9 @@ RedisStore
612612
~~~~~~~~~~
613613

614614
The RedisStore saves locks on a Redis server, it requires a Redis connection
615-
implementing the ``\Redis``, ``\RedisArray``, ``\RedisCluster``, ``\Relay\Relay`` or
616-
``\Predis`` classes. This store does not support blocking, and expects a TTL to
617-
avoid stalled locks::
615+
implementing the ``\Redis``, ``\RedisArray``, ``\RedisCluster``, ``\Relay\Relay``,
616+
``\Relay\Cluster`` or ``\Predis`` classes. This store does not support blocking,
617+
and expects a TTL to avoid stalled locks::
618618

619619
use Symfony\Component\Lock\Store\RedisStore;
620620

@@ -623,6 +623,10 @@ avoid stalled locks::
623623

624624
$store = new RedisStore($redis);
625625

626+
.. versionadded:: 7.3
627+
628+
Support for ``Relay\Cluster`` was introduced in Symfony 7.3.
629+
626630
.. _lock-store-semaphore:
627631

628632
SemaphoreStore

0 commit comments

Comments
 (0)