Skip to content

Commit

Permalink
Update using-redis.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
odinserj committed Dec 9, 2024
1 parent 668c8c6 commit dc86712
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions configuration/using-redis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,7 @@ For ASP.NET Core projects, call the ``UseRedisStorage`` method from the ``AddHan
services.AddHangfire(configuration => configuration.UseRedisStorage());
You can customize the connection string using the StackExchange.Redis' configuration string format. Please read `their documentation <https://stackexchange.github.io/StackExchange.Redis/Configuration>`_ for details. The values for the following options have their own defaults in Hangfire, but can be overridden in the *connection string*:

============================== ===========================
Option Default
============================== ===========================
``sslProtocols`` ``tls12``
``connectTimeout`` ``15000``
``syncTimeout`` ``30000``
``responseTimeout`` ``300000``
``keepAlive`` ``60``
``allowAdmin`` ``true``
``tieBreaker`` ``String.Empty``
``configurationChannel`` ``String.Empty``
``preferIOCP`` ``false``
``connectRetry`` ``0`` (external retries)
``abortOnConnectFail`` ``true`` (external retries)
============================== ===========================
You can customize the connection string using the StackExchange.Redis' configuration string format. Please read `their documentation <https://stackexchange.github.io/StackExchange.Redis/Configuration>`_ for details.

.. code-block:: csharp
Expand Down Expand Up @@ -170,3 +154,24 @@ If you are using a shared Redis server for multiple environments, you can specif
};
GlobalConfiguration.Configuration.UseRedisStorage("localhost", 0, options);
Default connection string values
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The values for the following options have their own defaults in Hangfire, but can be overridden in the *connection string*:

============================== ===========================
Option Default
============================== ===========================
``sslProtocols`` ``tls12``
``connectTimeout`` ``15000``
``syncTimeout`` ``30000``
``responseTimeout`` ``300000``
``keepAlive`` ``60``
``allowAdmin`` ``true``
``tieBreaker`` ``String.Empty``
``configurationChannel`` ``String.Empty``
``preferIOCP`` ``false``
``connectRetry`` ``0`` (external retries)
``abortOnConnectFail`` ``true`` (external retries)
============================== ===========================

0 comments on commit dc86712

Please sign in to comment.