diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2020-10-19 15:00:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-19 15:00:12 +0100 |
commit | 903d11c43a5df9f704e5dad4d14506a6470524fc (patch) | |
tree | 69a1e7d0bc51ba72f0f9026ca66759a0200f0c6c /synapse/storage/databases/main/roommember.py | |
parent | Include a simple message in email notifications that include encrypted conten... (diff) | |
download | synapse-903d11c43a5df9f704e5dad4d14506a6470524fc.tar.xz |
Add `DeferredCache.get_immediate` method (#8568)
* Add `DeferredCache.get_immediate` method A bunch of things that are currently calling `DeferredCache.get` are only really interested in the result if it's completed. We can optimise and simplify this case. * Remove unused 'default' parameter to DeferredCache.get() * another get_immediate instance
Diffstat (limited to 'synapse/storage/databases/main/roommember.py')
-rw-r--r-- | synapse/storage/databases/main/roommember.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/databases/main/roommember.py b/synapse/storage/databases/main/roommember.py index 20fcdaa529..9b08b49862 100644 --- a/synapse/storage/databases/main/roommember.py +++ b/synapse/storage/databases/main/roommember.py @@ -531,7 +531,7 @@ class RoomMemberWorkerStore(EventsWorkerStore): # If we do then we can reuse that result and simply update it with # any membership changes in `delta_ids` if context.prev_group and context.delta_ids: - prev_res = self._get_joined_users_from_context.cache.get( + prev_res = self._get_joined_users_from_context.cache.get_immediate( (room_id, context.prev_group), None ) if prev_res and isinstance(prev_res, dict): |