enable client side caching with RESP 3 protocol enabled

pull/19493/head
Bowen Liang 1 year ago
parent 5d2a383fe3
commit abfe6da7b4

@ -8,7 +8,7 @@ from redis.sentinel import Sentinel
from configs import dify_config from configs import dify_config
from dify_app import DifyApp from dify_app import DifyApp
from redis.cache import CacheConfig
class RedisClientWrapper: class RedisClientWrapper:
""" """
A wrapper class for the Redis client that addresses the issue where the global A wrapper class for the Redis client that addresses the issue where the global
@ -90,6 +90,8 @@ def init_app(app: DifyApp):
"host": dify_config.REDIS_HOST, "host": dify_config.REDIS_HOST,
"port": dify_config.REDIS_PORT, "port": dify_config.REDIS_PORT,
"connection_class": connection_class, "connection_class": connection_class,
"protocol": 3,
"cache_config": CacheConfig(),
} }
) )
pool = redis.ConnectionPool(**redis_params) pool = redis.ConnectionPool(**redis_params)

Loading…
Cancel
Save