✨(backend) add lobby cache clearing method for room and participant
Introduce new method on lobby system to clear lobby cache for specific room and participant combinations. Enables targeted cleanup of lobby state when participants leave or are removed, improving cache management and preventing stale lobby entries.
This commit is contained in:
committed by
aleb_the_flash
parent
6c633b1ecb
commit
84e62246b7
@@ -342,3 +342,9 @@ class LobbyService:
|
||||
return
|
||||
|
||||
cache.delete_many(keys)
|
||||
|
||||
def clear_participant_cache(self, room_id: UUID, participant_id: str) -> None:
|
||||
"""Clear a given participant entry from the cache for a specific room."""
|
||||
|
||||
cache_key = self._get_cache_key(room_id, participant_id)
|
||||
cache.delete(cache_key)
|
||||
|
||||
Reference in New Issue
Block a user