From f73fca297712d953dcd2bcdf1b9a651ea8ceb9df Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Sat, 24 May 2025 18:04:05 -0700 Subject: [PATCH] fix(auth_checks.py): set default user in-memory cache to 5s --- litellm/proxy/auth/auth_checks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/auth/auth_checks.py b/litellm/proxy/auth/auth_checks.py index 48e9787d00..05a47dd359 100644 --- a/litellm/proxy/auth/auth_checks.py +++ b/litellm/proxy/auth/auth_checks.py @@ -726,7 +726,9 @@ async def get_user_object( response_dict = _response.model_dump() # save the user object to cache - await user_api_key_cache.async_set_cache(key=user_id, value=response_dict) + await user_api_key_cache.async_set_cache( + key=user_id, value=response_dict, ttl=DEFAULT_IN_MEMORY_TTL + ) # save to db access time _update_last_db_access_time(