From a788a65ba66e184425178e6a831afafa0bf33dff Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Mon, 10 Jun 2024 05:28:31 +0100 Subject: [PATCH] Change Redis cache --- app/settings.py | 4 ++-- core/__init__.py | 1 - core/templates/registration/logout.html | 0 requirements.txt | 2 ++ 4 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 core/templates/registration/logout.html diff --git a/app/settings.py b/app/settings.py index efc08e0..17898d6 100644 --- a/app/settings.py +++ b/app/settings.py @@ -60,11 +60,11 @@ INSTALLED_APPS = [ # Performance optimisations CACHES = { "default": { - "BACKEND": "django.core.cache.backends.redis.RedisCache", + "BACKEND": "django_redis.cache.RedisCache", "LOCATION": "unix:///var/run/socks/redis.sock", "OPTIONS": { "db": "10", - "parser_class": "redis.connection.HiredisParser", + # "parser_class": "django_redis.cache.RedisCache", "pool_class": "redis.BlockingConnectionPool", }, } diff --git a/core/__init__.py b/core/__init__.py index d1d0e50..8743bfb 100644 --- a/core/__init__.py +++ b/core/__init__.py @@ -1,5 +1,4 @@ import os - import stripe from django.conf import settings diff --git a/core/templates/registration/logout.html b/core/templates/registration/logout.html deleted file mode 100644 index e69de29..0000000 diff --git a/requirements.txt b/requirements.txt index 56d0ffb..c2fd08c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -30,4 +30,6 @@ git+https://git.zm.is/XF/django-crud-mixins redis hiredis django-cachalot +django_redis +# Billing lago-python-client