We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6ead37 commit d42d2c0Copy full SHA for d42d2c0
fastapi_redis_cache/redis.py
@@ -22,6 +22,7 @@ def redis_connect(host_url: str) -> RedisConnectType:
22
23
24
def _connect(host_url: str) -> RedisConnectType:
25
+ """Connect and return a Redis client instance."""
26
try:
27
redis_client = redis.from_url(host_url)
28
if redis_client.ping():
@@ -35,6 +36,5 @@ def _connect(host_url: str) -> RedisConnectType:
35
36
37
38
def _connect_fake() -> tuple[RedisStatus, FakeRedis]:
- from fakeredis import FakeRedis
39
-
+ """Return a FakeRedis instance for testing purposes."""
40
return (RedisStatus.CONNECTED, FakeRedis())
0 commit comments