mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 10:04:56 -04:00
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
This commit is contained in:
parent
c356b4bf42
commit
903d11c43a
7 changed files with 53 additions and 27 deletions
|
@ -303,7 +303,7 @@ class PusherStore(PusherWorkerStore):
|
|||
lock=False,
|
||||
)
|
||||
|
||||
user_has_pusher = self.get_if_user_has_pusher.cache.get(
|
||||
user_has_pusher = self.get_if_user_has_pusher.cache.get_immediate(
|
||||
(user_id,), None, update_metrics=False
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue