Skip to content

Commit 90be9c3

Browse files
committed
async client can be used as session backend
1 parent 69121e6 commit 90be9c3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/source/async/advanced_configurations.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,13 @@ note that ``"CONNECTION_FACTORY"`` overrides ``DJANGO_VALKEY_CONNECTION_FACTORY`
8585

8686
if you want to use another factory you can use the same code with the path to your class.
8787

88+
Configure as session backend
89+
############################
90+
91+
django can by default use any cache backend as a session backend and you benefit from that by using django-valkey as backend for session storage without installing any additional backends:
92+
just add these settings to your settings.py
93+
94+
.. code-block:: python
95+
96+
SESSION_ENGINE = "django.contrib.sessions.backends.cache"
97+
SESSION_CACHE_ALIAS = "default

0 commit comments

Comments
 (0)