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 | 2ab574a7ee938ba6da935cbc3acac35778cb7db1 (patch) | |
| tree | ebff5140460e904423c3722ec5d38c804ab4b944 | |
| parent | d5f25174cbe34d5370991dade87662b79031fca1 (diff) | |
| download | Ishtar-2ab574a7ee938ba6da935cbc3acac35778cb7db1.tar.bz2 Ishtar-2ab574a7ee938ba6da935cbc3acac35778cb7db1.zip | |
Performance: keep db connection - cache sessions
| -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" | 
