From 6f7b4c412e1341a66d8dda608b07120a77935838 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Fri, 27 Dec 2024 11:45:59 +0530 Subject: [PATCH] feat: Use RESP3 for Redis cache connections (#28929) RESP3 has PUSH support which is useful for implementing client side caching. Enabling this before I work on that to test if anything breaks with this. No need to do this for background jobs instance just yet, infrequent accesses and performance doesn't matter as much. --- frappe/utils/redis_wrapper.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/utils/redis_wrapper.py b/frappe/utils/redis_wrapper.py index 6dc9421bc4..81bf195ed0 100644 --- a/frappe/utils/redis_wrapper.py +++ b/frappe/utils/redis_wrapper.py @@ -364,7 +364,7 @@ def setup_cache(): redis_class=RedisWrapper, ) - return RedisWrapper.from_url(frappe.conf.get("redis_cache")) + return RedisWrapper.from_url(frappe.conf.get("redis_cache"), protocol=3) def get_sentinel_connection( diff --git a/pyproject.toml b/pyproject.toml index 0156e4a64d..bcac7551d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ dependencies = [ "pytz==2023.3", "rauth~=0.7.3", "redis~=5.2.0", - "hiredis~=3.0.0", + "hiredis~=3.1.0", "setproctitle~=1.3.3", "requests-oauthlib~=1.3.1", "requests~=2.32.0",