diff --git a/acapy_cache_redis/v0_1/redis_base_cache.py b/acapy_cache_redis/v0_1/redis_base_cache.py index 9b3d05c..f891290 100644 --- a/acapy_cache_redis/v0_1/redis_base_cache.py +++ b/acapy_cache_redis/v0_1/redis_base_cache.py @@ -44,6 +44,13 @@ def __init__(self, root_profile: Profile) -> None: except KeyError as error: pass + # Get the connection string + try: + max_connections = int(config["max_connections"]) + except: + max_connections = 50 + LOGGER.debug(f"Max Redis Cache Pool connections set to: {max_connections}") + # Get the SSL CA Cert information (special redis SSL implementations only) try: lssl = config["ssl"] @@ -58,7 +65,7 @@ def __init__(self, root_profile: Profile) -> None: # Setup the aioredis instance self.pool = aioredis.ConnectionPool.from_url( self.connection, - max_connections=10, + max_connections=max_connections, username=username, password=password, # ssl_ca_certs=ca_cert,