Use memory cache backend in debug mode

This commit is contained in:
shamoon 2024-02-06 00:16:14 -08:00
parent 4813a7bc70
commit 9b03d29db3

View File

@ -771,6 +771,11 @@ CACHES = {
},
}
if DEBUG and os.getenv("PAPERLESS_CACHE_BACKEND") is None:
CACHES["default"][
"BACKEND"
] = "django.core.cache.backends.locmem.LocMemCache" # pragma: no cover
def default_threads_per_worker(task_workers) -> int:
# always leave one core open