mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
[Fix] Invalidate team cache after extra_permissions update
Ensures permission changes take effect immediately instead of waiting for cache TTL expiry. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4f6b8a2a3e
commit
0ca13cc6a5
1 changed files with 5 additions and 0 deletions
|
|
@ -2496,6 +2496,11 @@ async def team_member_update(
|
|||
data={"members_with_roles": json.dumps(_db_team_members_perms)}, # type: ignore
|
||||
)
|
||||
|
||||
# Invalidate team cache so permission changes take effect immediately
|
||||
from litellm.proxy.proxy_server import user_api_key_cache
|
||||
|
||||
user_api_key_cache.delete_cache(key="team_id:{}".format(data.team_id))
|
||||
|
||||
return TeamMemberUpdateResponse(
|
||||
team_id=data.team_id,
|
||||
user_id=received_user_id,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue