mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
_create_redis_cache
This commit is contained in:
parent
55294bc9ef
commit
2a377b161d
1 changed files with 5 additions and 2 deletions
|
@ -618,8 +618,11 @@ class Router:
|
|||
|
||||
@staticmethod
|
||||
def _create_redis_cache(
|
||||
cache_config: dict[str, Any]
|
||||
) -> RedisCache | RedisClusterCache:
|
||||
cache_config: Dict[str, Any]
|
||||
) -> Union[RedisCache, RedisClusterCache]:
|
||||
"""
|
||||
Initializes either a RedisCache or RedisClusterCache based on the cache_config.
|
||||
"""
|
||||
if cache_config.get("startup_nodes"):
|
||||
return RedisClusterCache(**cache_config)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue