From 3eb865714997c48fc8266aed7925ad5cb0ed74af Mon Sep 17 00:00:00 2001 From: Becky Smith Date: Sun, 18 Aug 2024 11:18:15 +0100 Subject: [PATCH] Try filesystem cache instead of memcached --- .gitignore | 1 + pipsevents/settings.py | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 17f457d6..6c8a4335 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ provision/.vaultpass pipsevents.log .venv*/ prices.json +cache/ \ No newline at end of file diff --git a/pipsevents/settings.py b/pipsevents/settings.py index a23d11d7..785a875e 100644 --- a/pipsevents/settings.py +++ b/pipsevents/settings.py @@ -117,7 +117,7 @@ ) # use local cache for tests -if TESTING or env('LOCAL'): +if TESTING: CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', @@ -126,10 +126,9 @@ } else: # pragma: no cover CACHES = { - 'default': { - 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', - 'LOCATION': '127.0.0.1:11211', - 'KEY_PREFIX': 'pips', + "default": { + "BACKEND": 'django.core.cache.backends.filebased.FileBasedCache', + "LOCATION": root("cache"), } }