Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
decorator: Put back check for dev env in `ignore_unhashable_lru_cache`.
Lauryn Menard19a4c3907f3b
diff --git a/zerver/lib/cache.py b/zerver/lib/cache.pyindex 063019c4c4f..90f6902b277 100644--- a/zerver/lib/cache.py+++ b/zerver/lib/cache.py@@ -756,6 +756,11 @@ class IgnoreUnhashableLruCacheWrapper(Generic[ParamT, ReturnT]):self.cache_clear = cached_function.cache_cleardef __call__(self, *args: ParamT.args, **kwargs: ParamT.kwargs) -> ReturnT:+ if settings.DEVELOPMENT and not settings.TEST_SUITE: # nocoverage+ # In the development environment, we want every file+ # change to refresh the source files from disk.+ return self.function(*args, **kwargs)+if self.key_prefix != KEY_PREFIX:# Clear cache when cache.KEY_PREFIX changes. This is used in# tests.