Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c190ecb

Browse files
committed
minor #17870 [Cache] Add Redis Relay doc (ostrolucky)
This PR was merged into the 6.3 branch. Discussion ---------- [Cache] Add Redis Relay doc Closes #17813. Let me know if this is enough or what else should be done. Commits ------- 0b3e3f9 Add Redis Relay doc
2 parents 4901a66 + 0b3e3f9 commit c190ecb

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

components/cache/adapters/redis_adapter.rst

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ to utilize a cluster of servers to provide redundancy and/or fail-over is also a
2525

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

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

@@ -47,6 +47,10 @@ as the second and third parameters::
4747
$defaultLifetime = 0
4848
);
4949

50+
.. versionadded:: 6.3
51+
52+
Support for `Relay`_ was introduced in Symfony 6.3.
53+
5054
Configure the Connection
5155
------------------------
5256

@@ -165,10 +169,14 @@ array of ``key => value`` pairs representing option names and their respective v
165169
Available Options
166170
~~~~~~~~~~~~~~~~~
167171

172+
.. versionadded:: 6.3
173+
174+
``\Relay\Relay`` support was introduced in Symfony 6.3.
175+
168176
``class`` (type: ``string``, default: ``null``)
169-
Specifies the connection library to return, either ``\Redis`` or ``\Predis\Client``.
170-
If none is specified, it will return ``\Redis`` if the ``redis`` extension is
171-
available, and ``\Predis\Client`` otherwise. Explicitly set this to ``\Predis\Client`` for Sentinel if you are
177+
Specifies the connection library to return, either ``\Redis``, ``\Relay\Relay`` or ``\Predis\Client``.
178+
If none is specified, fallback value is in following order, depending which one is available first:
179+
``\Redis``, ``\Relay\Relay``, ``\Predis\Client``. Explicitly set this to ``\Predis\Client`` for Sentinel if you are
172180
running into issues when retrieving master information.
173181

174182
``persistent`` (type: ``int``, default: ``0``)
@@ -258,6 +266,7 @@ Read more about this topic in the official `Redis LRU Cache Documentation`_.
258266
.. _`Redis`: https://github.com/phpredis/phpredis
259267
.. _`RedisArray`: https://github.com/phpredis/phpredis/blob/master/arrays.markdown#readme
260268
.. _`RedisCluster`: https://github.com/phpredis/phpredis/blob/master/cluster.markdown#readme
269+
.. _`Relay`: https://relay.so/
261270
.. _`Predis`: https://packagist.org/packages/predis/predis
262271
.. _`Predis Connection Parameters`: https://github.com/nrk/predis/wiki/Connection-Parameters#list-of-connection-parameters
263272
.. _`TCP-keepalive`: https://redis.io/topics/clients#tcp-keepalive

components/lock.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,8 +602,12 @@ store locks and does not expire.
602602
RedisStore
603603
~~~~~~~~~~
604604

605+
.. versionadded:: 6.3
606+
607+
``\Relay\Relay`` support was introduced in Symfony 6.3.
608+
605609
The RedisStore saves locks on a Redis server, it requires a Redis connection
606-
implementing the ``\Redis``, ``\RedisArray``, ``\RedisCluster`` or
610+
implementing the ``\Redis``, ``\RedisArray``, ``\RedisCluster``, ``\Relay\Relay`` or
607611
``\Predis`` classes. This store does not support blocking, and expects a TTL to
608612
avoid stalled locks::
609613

session.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ a Symfony service for the connection to the Redis server:
503503
# - { 'prefix': 'my_prefix', 'ttl': 600 }
504504

505505
Redis:
506-
# you can also use \RedisArray, \RedisCluster or \Predis\Client classes
506+
# you can also use \RedisArray, \RedisCluster, \Relay\Relay or \Predis\Client classes
507507
class: Redis
508508
calls:
509509
- connect:
@@ -526,7 +526,7 @@ a Symfony service for the connection to the Redis server:
526526
xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">
527527
528528
<services>
529-
<!-- you can also use \RedisArray, \RedisCluster or \Predis\Client classes -->
529+
<!-- you can also use \RedisArray, \RedisCluster, \Relay\Relay or \Predis\Client classes -->
530530
<service id="Redis" class="Redis">
531531
<call method="connect">
532532
<argument>%env(REDIS_HOST)%</argument>
@@ -565,7 +565,7 @@ a Symfony service for the connection to the Redis server:
565565
use Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler;
566566
567567
$container
568-
// you can also use \RedisArray, \RedisCluster or \Predis\Client classes
568+
// you can also use \RedisArray, \RedisCluster, \Relay\Relay or \Predis\Client classes
569569
->register('Redis', \Redis::class)
570570
->addMethodCall('connect', ['%env(REDIS_HOST)%', '%env(int:REDIS_PORT)%'])
571571
// uncomment the following if your Redis server requires a password:

0 commit comments

Comments
 (0)