Changed default URI for Redis
This commit is contained in:
6
classes/cache/holo_cache_redis.py
vendored
6
classes/cache/holo_cache_redis.py
vendored
@@ -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:
|
||||
|
Reference in New Issue
Block a user