Skip to content

Commit

Permalink
设置session使用redis存储
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryJi529 committed Jun 4, 2024
1 parent e4ff270 commit 2f6baa6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Morningstar/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@
}
}

"""缓存"""
"""缓存与会话"""
SESSION_ENGINE = "django.contrib.sessions.backends.cache"
SESSION_CACHE_ALIAS = "default"
SESSION_SERIALIZER = "django.contrib.sessions.serializers.JSONSerializer"
CACHE_TIMEOUT = 60 * 5
CACHES = {
"default": {
Expand Down

0 comments on commit 2f6baa6

Please sign in to comment.