diff --git a/README.md b/README.md index 14a2b7b..f4e328a 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,5 @@ # cove-oc4ids -### Caching - -In non-dev or (not DEBUG mode) the default settings make use of a local memcached server. This backend requires a local memcached server running. On debian based systems this can be installed with `sudo apt install memcached`. - ## Dev installation ```bash diff --git a/core/settings.py b/core/settings.py index ee66c45..86d7cf1 100644 --- a/core/settings.py +++ b/core/settings.py @@ -229,8 +229,8 @@ if production: CACHES = { "default": { - "BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache", - "LOCATION": os.getenv("MEMCACHED_URL", "127.0.0.1:11211"), + "BACKEND": "django.core.cache.backends.redis.RedisCache", + "LOCATION": os.getenv("REDIS_URL", "redis://localhost:6379/0"), } } diff --git a/requirements.in b/requirements.in index 127bdb0..e8c5e34 100644 --- a/requirements.in +++ b/requirements.in @@ -4,5 +4,5 @@ gunicorn[setproctitle] libcove libcoveoc4ids[perf] libcoveweb -pymemcache +redis[hiredis] sentry-sdk diff --git a/requirements.txt b/requirements.txt index 5c2a9df..5185cd1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -47,6 +47,8 @@ flattentool==0.26.0 # libcoveweb gunicorn[setproctitle]==23.0.0 # via -r requirements.in +hiredis==3.1.0 + # via redis idna==3.7 # via requests ijson==3.3.0 @@ -99,10 +101,10 @@ platformdirs==4.1.0 # via requests-cache pycparser==2.20 # via cffi -pymemcache==4.0.0 - # via -r requirements.in pytz==2021.1 # via flattentool +redis==5.2.1 + # via -r requirements.in referencing==0.32.0 # via # jsonschema diff --git a/requirements_dev.txt b/requirements_dev.txt index 7a2b473..cff46fa 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -80,6 +80,8 @@ gunicorn[setproctitle]==23.0.0 # via -r requirements.txt h11==0.14.0 # via wsproto +hiredis==3.1.0 + # via -r requirements.txt idna==3.7 # via # -r requirements.txt @@ -173,8 +175,6 @@ pycparser==2.20 # via # -r requirements.txt # cffi -pymemcache==4.0.0 - # via -r requirements.txt pysocks==1.7.1 # via urllib3 pytest==7.3.1 @@ -189,6 +189,8 @@ pytz==2021.1 # via # -r requirements.txt # flattentool +redis==5.2.1 + # via -r requirements.txt referencing==0.32.0 # via # -r requirements.txt