Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Cache][Lock] Add support forRelay\Cluster in docs#21009

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
javiereguiluz merged 1 commit intosymfony:7.3fromjaviereguiluz:fix_20709
May 29, 2025
Merged
Show file tree
Hide file tree
Changes fromall 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
32 changes: 30 additions & 2 deletionscomponents/cache/adapters/redis_adapter.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,9 +20,9 @@ to utilize a cluster of servers to provide redundancy and/or fail-over is also a

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

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

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

.. versionadded:: 7.3

Support for ``Relay\Cluster`` was introduced in Symfony 7.3.

Configure the Connection
------------------------

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

``relay_cluster_context`` (type: ``array``, default: ``[]``)
Defines configuration options specific to ``\Relay\Cluster``. For example, to
user a self-signed certificate for testing in local environment::

$options = [
// ...
'relay_cluster_context' => [
// ...
'stream' => [
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true,
'local_cert' => '/valkey.crt',
'local_pk' => '/valkey.key',
'cafile' => '/valkey.crt',
],
],
];

.. versionadded:: 7.1

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

.. versionadded:: 7.3

The ``relay_cluster_context`` option was introduced in Symfony 7.3.

.. note::

When using the `Predis`_ library some additional Predis-specific options are available.
Expand DownExpand Up@@ -359,6 +386,7 @@ Supports key rotation, ensuring secure decryption with both old and new keys::
.. _`RedisArray`: https://github.com/phpredis/phpredis/blob/develop/arrays.md
.. _`RedisCluster`: https://github.com/phpredis/phpredis/blob/develop/cluster.md
.. _`Relay`: https://relay.so/
.. _`RelayCluster`: https://relay.so/docs/1.x/connections#cluster
.. _`Predis`: https://packagist.org/packages/predis/predis
.. _`Predis Connection Parameters`: https://github.com/nrk/predis/wiki/Connection-Parameters#list-of-connection-parameters
.. _`TCP-keepalive`: https://redis.io/topics/clients#tcp-keepalive
Expand Down
10 changes: 7 additions & 3 deletionscomponents/lock.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -612,9 +612,9 @@ RedisStore
~~~~~~~~~~

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

use Symfony\Component\Lock\Store\RedisStore;

Expand All@@ -623,6 +623,10 @@ avoid stalled locks::

$store = new RedisStore($redis);

.. versionadded:: 7.3

Support for ``Relay\Cluster`` was introduced in Symfony 7.3.

.. _lock-store-semaphore:

SemaphoreStore
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp