diff --git a/litellm/caching.py b/litellm/caching.py index 99f9012b1b..bf1d61eec3 100644 --- a/litellm/caching.py +++ b/litellm/caching.py @@ -478,7 +478,9 @@ class RedisCache(BaseCache): _duration = end_time - start_time asyncio.create_task( self.service_logger_obj.async_service_success_hook( - service=ServiceTypes.REDIS, duration=_duration + service=ServiceTypes.REDIS, + duration=_duration, + call_type="async_get_cache", ) ) return response @@ -488,7 +490,10 @@ class RedisCache(BaseCache): _duration = end_time - start_time asyncio.create_task( self.service_logger_obj.async_service_failure_hook( - service=ServiceTypes.REDIS, duration=_duration, error=e + service=ServiceTypes.REDIS, + duration=_duration, + error=e, + call_type="async_get_cache", ) ) # NON blocking - notify users Redis is throwing an exception diff --git a/litellm/tests/test_custom_logger.py b/litellm/tests/test_custom_logger.py index 0b85b463ce..347fb57ba6 100644 --- a/litellm/tests/test_custom_logger.py +++ b/litellm/tests/test_custom_logger.py @@ -412,7 +412,7 @@ async def test_cost_tracking_with_caching(): """ from litellm import Cache - litellm.set_verbose = False + litellm.set_verbose = True litellm.cache = Cache( type="redis", host=os.environ["REDIS_HOST"],