summaryrefslogtreecommitdiff
path: root/example_project/settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'example_project/settings.py')
-rw-r--r--example_project/settings.py6
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"