Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions components/cache/adapters/redis_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,21 @@ Below are common examples of valid DSNs showing a combination of available value
'redis:?host[localhost]&host[localhost:6379]&host[/var/run/redis.sock:]&auth=my-password&redis_cluster=1'
);

// Redis Sentinel is also supported in the same way
// set the redis_sentinel parameter to the name of your service group
// Sentinel support also requires the Predis library
RedisAdapter::createConnection(
'redis:?host[redis1:26379]&host[redis2:26379]&host[redis3:26379]&redis_sentinel=mymaster'
);

.. versionadded:: 4.2

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

.. versionadded:: 4.4

Redis Sentinel support was introduced in Symfony 4.4.

.. note::

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