Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 06a4d0b

Browse files
committed
Remove unneeded num_args in @cached decorators.
1 parent 5145bee commit 06a4d0b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

synapse/storage/databases/main/receipts.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ async def get_users_with_read_receipts_in_room(self, room_id: str) -> Set[str]:
122122
receipts = await self.get_receipts_for_room(room_id, ReceiptTypes.READ)
123123
return {r["user_id"] for r in receipts}
124124

125-
@cached(num_args=2)
125+
@cached()
126126
async def get_receipts_for_room(
127127
self, room_id: str, receipt_type: str
128128
) -> List[Dict[str, Any]]:
@@ -143,7 +143,7 @@ async def get_receipts_for_room(
143143
desc="get_receipts_for_room",
144144
)
145145

146-
@cached(num_args=3)
146+
@cached()
147147
async def get_last_receipt_event_id_for_user(
148148
self, user_id: str, room_id: str, receipt_type: str
149149
) -> Optional[str]:
@@ -170,7 +170,7 @@ async def get_last_receipt_event_id_for_user(
170170
allow_none=True,
171171
)
172172

173-
@cached(num_args=2)
173+
@cached()
174174
async def get_receipts_for_user(
175175
self, user_id: str, receipt_type: str
176176
) -> Dict[str, str]:
@@ -283,7 +283,7 @@ async def get_linearized_receipts_for_room(
283283

284284
return await self._get_linearized_receipts_for_room(room_id, to_key, from_key)
285285

286-
@cached(num_args=3, tree=True)
286+
@cached(tree=True)
287287
async def _get_linearized_receipts_for_room(
288288
self, room_id: str, to_key: int, from_key: Optional[int] = None
289289
) -> List[JsonDict]:

0 commit comments

Comments
 (0)