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

Skip to content

Commit cb78515

Browse files
committed
Add Redis Relay doc
1 parent 4469526 commit cb78515

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

components/cache/adapters/redis_adapter.rst

Lines changed: 6 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`_ (since Symfony 6.1) 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

@@ -166,9 +166,9 @@ Available Options
166166
~~~~~~~~~~~~~~~~~
167167

168168
``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
169+
Specifies the connection library to return, either ``\Redis``, ``\Relay\Relay`` or ``\Predis\Client``.
170+
If none is specified, fallback value is in following order, depending which one is available first:
171+
``\Redis``, ``\Relay\Relay``, ``\Predis\Client``. Explicitly set this to ``\Predis\Client`` for Sentinel if you are
172172
running into issues when retrieving master information.
173173

174174
``persistent`` (type: ``int``, default: ``0``)
@@ -258,6 +258,7 @@ Read more about this topic in the official `Redis LRU Cache Documentation`_.
258258
.. _`Redis`: https://github.com/phpredis/phpredis
259259
.. _`RedisArray`: https://github.com/phpredis/phpredis/blob/master/arrays.markdown#readme
260260
.. _`RedisCluster`: https://github.com/phpredis/phpredis/blob/master/cluster.markdown#readme
261+
.. _`Relay`: https://relay.so/
261262
.. _`Predis`: https://packagist.org/packages/predis/predis
262263
.. _`Predis Connection Parameters`: https://github.com/nrk/predis/wiki/Connection-Parameters#list-of-connection-parameters
263264
.. _`TCP-keepalive`: https://redis.io/topics/clients#tcp-keepalive

components/lock.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ RedisStore
603603
~~~~~~~~~~
604604

605605
The RedisStore saves locks on a Redis server, it requires a Redis connection
606-
implementing the ``\Redis``, ``\RedisArray``, ``\RedisCluster`` or
606+
implementing the ``\Redis``, ``\RedisArray``, ``\RedisCluster``, \Relay\Relay (since Symfony 6.1) or
607607
``\Predis`` classes. This store does not support blocking, and expects a TTL to
608608
avoid stalled locks::
609609

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 (since Symfony 6.1) 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)