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

Commit

Permalink
Add on_invalidate to the function signature in the hopes that may m…
Browse files Browse the repository at this point in the history
…ake things work well
  • Loading branch information
Half-Shot committed Oct 28, 2020
1 parent a71524c commit 2366b38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions synapse/appservice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from synapse.api.constants import EventTypes
from synapse.events import EventBase
from synapse.types import GroupID, JsonDict, UserID, get_domain_from_id
from synapse.util.caches.descriptors import cached
from synapse.util.caches.descriptors import _CacheContext, cached

if TYPE_CHECKING:
from synapse.appservice.api import ApplicationServiceApi
Expand Down Expand Up @@ -166,7 +166,7 @@ async def _matches_user(

@cached(num_args=1, cache_context=True)
async def matches_user_in_member_list(
self, room_id: str, store: "DataStore", cache_context,
self, room_id: str, store: "DataStore", cache_context: _CacheContext,
) -> bool:
"""Check if this service is interested a room based upon it's membership
Expand Down
2 changes: 1 addition & 1 deletion synapse/storage/databases/main/roommember.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def _check_safe_current_state_events_membership_updated_txn(self, txn):
)

@cached(max_entries=100000, iterable=True)
async def get_users_in_room(self, room_id: str) -> List[str]:
async def get_users_in_room(self, room_id: str, **kwargs) -> List[str]:
return await self.db_pool.runInteraction(
"get_users_in_room", self.get_users_in_room_txn, room_id
)
Expand Down

0 comments on commit 2366b38

Please sign in to comment.