We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 226a334 commit 366c7f0Copy full SHA for 366c7f0
autogen/cache/cache_factory.py
@@ -1,7 +1,9 @@
1
-from typing import Optional, Union, Type
+from typing import Optional, Union
2
from .abstract_cache_base import AbstractCache
3
from .disk_cache import DiskCache
4
5
+import logging
6
+
7
8
class CacheFactory:
9
@staticmethod
@@ -45,6 +47,7 @@ def cache_factory(
45
47
46
48
return RedisCache(seed, redis_url)
49
except ImportError:
50
+ logging.warning("RedisCache is not available. Creating a DiskCache instance instead.")
51
return DiskCache(f"./{cache_path_root}/{seed}")
52
else:
53
0 commit comments