From 98e6f703e1df5f47079959c0a40d6db18c03d54d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Thu, 26 Jan 2017 17:05:43 +0100 Subject: [PATCH 1/2] Use custom redis prefix for asgi and cache entries. Note: These prefix have to be unique for each OpenSlides instance! --- openslides/utils/settings.py.tpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openslides/utils/settings.py.tpl b/openslides/utils/settings.py.tpl index 1d5bd8512..49ac1f795 100644 --- a/openslides/utils/settings.py.tpl +++ b/openslides/utils/settings.py.tpl @@ -80,6 +80,7 @@ if use_redis: # https://channels.readthedocs.io/en/latest/backends.html#redis CHANNEL_LAYERS['default']['BACKEND'] = 'asgi_redis.RedisChannelLayer' + CHANNEL_LAYERS['default']['CONFIG']['prefix'] = 'asgi:' # Caching @@ -94,7 +95,8 @@ if use_redis: "LOCATION": "redis://127.0.0.1:6379/0", "OPTIONS": { "CLIENT_CLASS": "django_redis.client.DefaultClient", - } + }, + "KEY_PREFIX": "openslides-cache" } } From 5dcfc69ff87b8c034d76986977f54484fba661dd Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Thu, 26 Jan 2017 18:03:13 +0100 Subject: [PATCH 2/2] Update settings.py.tpl Also the last line of a dict should end with a ',' or with the closing } --- openslides/utils/settings.py.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openslides/utils/settings.py.tpl b/openslides/utils/settings.py.tpl index 49ac1f795..00abad7b0 100644 --- a/openslides/utils/settings.py.tpl +++ b/openslides/utils/settings.py.tpl @@ -96,7 +96,7 @@ if use_redis: "OPTIONS": { "CLIENT_CLASS": "django_redis.client.DefaultClient", }, - "KEY_PREFIX": "openslides-cache" + "KEY_PREFIX": "openslides-cache", } }