diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-08-28 15:04:11 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-08-28 15:04:11 +0200 |
commit | 4d9db86ec0e5bcf664d57da126a9cc6abde5cf2f (patch) | |
tree | ebff5140460e904423c3722ec5d38c804ab4b944 /example_project/settings.py | |
parent | 8fe3e5377aa2d498d43c7d0ad2637bc6ccc65e7e (diff) | |
download | Ishtar-4d9db86ec0e5bcf664d57da126a9cc6abde5cf2f.tar.bz2 Ishtar-4d9db86ec0e5bcf664d57da126a9cc6abde5cf2f.zip |
Performance: keep db connection - cache sessions
Diffstat (limited to 'example_project/settings.py')
-rw-r--r-- | example_project/settings.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/example_project/settings.py b/example_project/settings.py index 2d19cacc6..c9abdf9f5 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -304,3 +304,9 @@ if SQL_DEBUG: if 'test' in sys.argv: PROJECT_SLUG += "-test" + +if not DEBUG: + # persistent connection + DATABASES['default']['CONN_MAX_AGE'] = 600 + # session in cache and database + SESSION_ENGINE = "django.contrib.sessions.backends.cached_db" |