Changed default URI for Redis

This commit is contained in:
2025-02-09 23:40:09 +01:00
parent a54ef39e53
commit cda570eb37
3 changed files with 4 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
import logging
from logging import Logger
from typing import Dict, Any, List
from typing import Dict, Any
from redis import Redis
@@ -25,9 +25,7 @@ class HoloCacheRedis(HoloCache):
"Cache configuration is invalid. Please check if all keys are set (engine: memcached)"
)
uri_split: List[str] = engine_config["uri"].split(":")
return cls(Redis(host=uri_split[0], port=int(uri_split[1])))
return cls(Redis.from_url(engine_config["uri"]))
def get_json(self, key: str) -> Any | None:
try: