mirror of
https://mau.dev/maunium/synapse.git
synced 2024-08-23 18:56:10 +00:00
Pull the _get_event_cache.setdefault() call out of the try block, as it doesn't need to be there and is confusing
This commit is contained in:
parent
044d813ef7
commit
a09e59a698
@ -636,8 +636,9 @@ class SQLBaseStore(object):
|
|||||||
start_time = time.time() * 1000
|
start_time = time.time() * 1000
|
||||||
update_counter = self._get_event_counters.update
|
update_counter = self._get_event_counters.update
|
||||||
|
|
||||||
try:
|
|
||||||
cache = self._get_event_cache.setdefault(event_id, {})
|
cache = self._get_event_cache.setdefault(event_id, {})
|
||||||
|
|
||||||
|
try:
|
||||||
# Separate cache entries for each way to invoke _get_event_txn
|
# Separate cache entries for each way to invoke _get_event_txn
|
||||||
return cache[(check_redacted, get_prev_content, allow_rejected)]
|
return cache[(check_redacted, get_prev_content, allow_rejected)]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
Loading…
Reference in New Issue
Block a user