mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
fix(proxy_server.py): add support for setting master key via .env
This commit is contained in:
parent
ef8f1acfa4
commit
14e501845f
4 changed files with 36 additions and 6 deletions
|
@ -579,10 +579,11 @@ async def _cache_user_row(user_id: str, cache: DualCache, db: PrismaClient):
|
|||
response = cache.get_cache(key=cache_key)
|
||||
if response is None: # Cache miss
|
||||
user_row = await db.get_data(user_id=user_id)
|
||||
cache_value = user_row.model_dump_json()
|
||||
cache.set_cache(
|
||||
key=cache_key, value=cache_value, ttl=600
|
||||
) # store for 10 minutes
|
||||
if user_row is not None:
|
||||
cache_value = user_row.model_dump_json()
|
||||
cache.set_cache(
|
||||
key=cache_key, value=cache_value, ttl=600
|
||||
) # store for 10 minutes
|
||||
return
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue