Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

cache: Make the cache_name=None behaviour clearer.

Alex Vandiveraaa58a49dbf8
diff --git a/zerver/lib/cache.py b/zerver/lib/cache.py
index 7b3ee9d946f..35b5dec3888 100644
--- a/zerver/lib/cache.py
+++ b/zerver/lib/cache.py
@@ -22,7 +22,6 @@ from typing import (
)
from django.conf import settings
-from django.core.cache import cache as djcache
from django.core.cache import caches
from django.core.cache.backends.base import BaseCache
from django.db.models import Q
@@ -126,7 +125,7 @@ def bounce_key_prefix_for_testing(test_name: str) -> None:
def get_cache_backend(cache_name: Optional[str]) -> BaseCache:
if cache_name is None:
- return djcache
+ cache_name = "default"
return caches[cache_name]