diff --git a/litellm/proxy/_new_secret_config.yaml b/litellm/proxy/_new_secret_config.yaml index b712afaf0..d13fb3f37 100644 --- a/litellm/proxy/_new_secret_config.yaml +++ b/litellm/proxy/_new_secret_config.yaml @@ -3,3 +3,7 @@ model_list: litellm_params: model: "*" +litellm_settings: + cache: true + cache_params: + type: redis \ No newline at end of file diff --git a/litellm/proxy/auth/auth_checks.py b/litellm/proxy/auth/auth_checks.py index 7c5356a37..75f5dd108 100644 --- a/litellm/proxy/auth/auth_checks.py +++ b/litellm/proxy/auth/auth_checks.py @@ -373,12 +373,13 @@ async def _cache_team_object( proxy_logging_obj: Optional[ProxyLogging], ): key = "team_id:{}".format(team_id) - await user_api_key_cache.async_set_cache(key=key, value=team_table) + value = team_table.model_dump_json(exclude_unset=True) + await user_api_key_cache.async_set_cache(key=key, value=value) ## UPDATE REDIS CACHE ## if proxy_logging_obj is not None: await proxy_logging_obj.internal_usage_cache.async_set_cache( - key=key, value=team_table + key=key, value=value )