Skip to content
Snippets Groups Projects
Commit c10ac780 authored by Erik Johnston's avatar Erik Johnston
Browse files

Explain why we're prefilling dict with Nones

parent 101ee3fd
Branches
Tags
No related merge requests found
...@@ -412,6 +412,10 @@ class StateStore(SQLBaseStore): ...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment