mirror of
https://mau.dev/maunium/synapse.git
synced 2024-08-23 10:45:48 +00:00
Explain why we're prefilling dict with Nones
This commit is contained in:
parent
101ee3fd00
commit
c10ac7806e
@ -412,6 +412,10 @@ class StateStore(SQLBaseStore):
|
|||||||
|
|
||||||
for group, state_ids in group_state_dict.items():
|
for group, state_ids in group_state_dict.items():
|
||||||
if types:
|
if types:
|
||||||
|
# We delibrately put key -> None mappings into the cache to
|
||||||
|
# cache absence of the key, on the assumption that if we've
|
||||||
|
# explicitly asked for some types then we will probably ask
|
||||||
|
# for them again.
|
||||||
state_dict = {
|
state_dict = {
|
||||||
key: None
|
key: None
|
||||||
for key in types
|
for key in types
|
||||||
|
Loading…
Reference in New Issue
Block a user