From 7365eeacc8fece4e134c677c0cb02f9b6e6fc217 Mon Sep 17 00:00:00 2001 From: Joel Addison Date: Sun, 20 Oct 2019 22:59:07 +1000 Subject: [PATCH] Use dummy cache in dev mode --- pinaxcon/settings.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pinaxcon/settings.py b/pinaxcon/settings.py index 4216a869..2b903d52 100644 --- a/pinaxcon/settings.py +++ b/pinaxcon/settings.py @@ -107,12 +107,19 @@ if fail: ADMIN_USERNAMES = [] -CACHES = { - 'default': { - 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', - 'LOCATION': 'unique-snowflake', +if DEV_MODE and DEV_MODE == "LAPTOP": + CACHES = { + 'default': { + 'BACKEND': 'django.core.cache.backends.dummy.DummyCache', + } + } +else: + CACHES = { + 'default': { + 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', + 'LOCATION': 'unique-snowflake', + } } -} ALLOWED_HOSTS = ['127.0.0.1', 'localhost', '*']