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

Skip to content

Commit 8aba93d

Browse files
committed
minor #11545 Document Redis Sentinel support for Cache (StephenClouse)
This PR was squashed before being merged into the master branch (closes #11545). Discussion ---------- Document Redis Sentinel support for Cache Accompanying docs for symfony/symfony#31437 Commits ------- 4cfe39b Document Redis Sentinel support for Cache
2 parents 486ebab + 4cfe39b commit 8aba93d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

components/cache/adapters/redis_adapter.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,21 @@ Below are common examples of valid DSNs showing a combination of available value
9494
'redis:?host[localhost]&host[localhost:6379]&host[/var/run/redis.sock:]&auth=my-password&redis_cluster=1'
9595
);
9696

97+
// Redis Sentinel is also supported in the same way
98+
// set the redis_sentinel parameter to the name of your service group
99+
// Sentinel support also requires the Predis library
100+
RedisAdapter::createConnection(
101+
'redis:?host[redis1:26379]&host[redis2:26379]&host[redis3:26379]&redis_sentinel=mymaster'
102+
);
103+
97104
.. versionadded:: 4.2
98105

99106
The option to define multiple servers in a single DSN was introduced in Symfony 4.2.
100107

108+
.. versionadded:: 4.4
109+
110+
Redis Sentinel support was introduced in Symfony 4.4.
111+
101112
.. note::
102113

103114
See the :class:`Symfony\\Component\\Cache\\Traits\\RedisTrait` for more options

0 commit comments

Comments
 (0)