]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Chore: Use memory cache backend in debug mode (#5666)
authorshamoon <4887959+shamoon@users.noreply.github.com>
Tue, 6 Feb 2024 15:16:15 +0000 (07:16 -0800)
committerGitHub <noreply@github.com>
Tue, 6 Feb 2024 15:16:15 +0000 (07:16 -0800)
src/paperless/settings.py

index 4f7894acc2ff18da0fb07865293b8d8b13142b6d..d485415caf2bb0bf9ddcbac88e622283546c2d3a 100644 (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