From 06a4d0be4368bf784d4784cd0b8955aa47857ce6 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Thu, 28 Apr 2022 09:20:34 -0400 Subject: [PATCH] Remove unneeded num_args in @cached decorators. --- synapse/storage/databases/main/receipts.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/synapse/storage/databases/main/receipts.py b/synapse/storage/databases/main/receipts.py index a71982d0e8e5..6d7afd86bcdc 100644 --- a/synapse/storage/databases/main/receipts.py +++ b/synapse/storage/databases/main/receipts.py @@ -122,7 +122,7 @@ async def get_users_with_read_receipts_in_room(self, room_id: str) -> Set[str]: receipts = await self.get_receipts_for_room(room_id, ReceiptTypes.READ) return {r["user_id"] for r in receipts} - @cached(num_args=2) + @cached() async def get_receipts_for_room( self, room_id: str, receipt_type: str ) -> List[Dict[str, Any]]: @@ -143,7 +143,7 @@ async def get_receipts_for_room( desc="get_receipts_for_room", ) - @cached(num_args=3) + @cached() async def get_last_receipt_event_id_for_user( self, user_id: str, room_id: str, receipt_type: str ) -> Optional[str]: @@ -170,7 +170,7 @@ async def get_last_receipt_event_id_for_user( allow_none=True, ) - @cached(num_args=2) + @cached() async def get_receipts_for_user( self, user_id: str, receipt_type: str ) -> Dict[str, str]: @@ -283,7 +283,7 @@ async def get_linearized_receipts_for_room( return await self._get_linearized_receipts_for_room(room_id, to_key, from_key) - @cached(num_args=3, tree=True) + @cached(tree=True) async def _get_linearized_receipts_for_room( self, room_id: str, to_key: int, from_key: Optional[int] = None ) -> List[JsonDict]: