You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/async/advanced_configurations.rst
+23-1Lines changed: 23 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,12 @@ if you need those middlewares, consider using a sync client or implement a new m
12
12
Clients
13
13
#######
14
14
15
-
as of now, we only have one async client, ``AsyncDefaultClient``, available in ``django_valkey.async_cache.client.default``.
15
+
as of now, we have two async client, ``AsyncDefaultClient``, available in ``django_valkey.async_cache.client.default``, and ``AsyncHerdClient`` available in ``django_valkey.async_cache.client.herd``.
16
16
the default client can also be used with sentinels, as we'll discuss later.
17
17
18
+
Default client
19
+
^^^^^^^^^^^^^^
20
+
18
21
the ``AsyncDefaultClient`` is configured by default by ``AsyncValkeyCache``, so if you have configured that as your backend you are all set, but if you want to be explicit or use the client with a different backend you can write it like this:
19
22
20
23
.. code-block:: python
@@ -33,6 +36,23 @@ the ``AsyncDefaultClient`` is configured by default by ``AsyncValkeyCache``, so
33
36
34
37
or you can replace the client with your own like that.
35
38
39
+
Herd client
40
+
^^^^^^^^^^^
41
+
42
+
the herd client needs to be configured, but it's as simple as this:
@@ -24,4 +27,21 @@ And that's it, the backend defaults to use AsyncDefaultClient as client interfac
24
27
25
28
you can, of course configure it to use any other class, or pass in extras args and kwargs, the same way that was discussed at :doc:`../configure/advanced_configurations`.
26
29
30
+
Herd client
31
+
###########
32
+
33
+
to set up herd client configure your settings like this:
0 commit comments