summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2020-10-08 13:24:46 -0400
committerGitHub <noreply@github.com>2020-10-08 13:24:46 -0400
commita97cec18bba42e5cb743f61e79f253d6d95a0c0c (patch)
treedf9853b4a6e9a10613595dfef85e9295e5486ff2 /synapse/storage
parentMerge tag 'v1.21.0rc3' into develop (diff)
downloadsynapse-a97cec18bba42e5cb743f61e79f253d6d95a0c0c.tar.xz
Invalidate the cache when an olm fallback key is uploaded (#8501)
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/databases/main/end_to_end_keys.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/storage/databases/main/end_to_end_keys.py b/synapse/storage/databases/main/end_to_end_keys.py
index 359dc6e968..4415909414 100644
--- a/synapse/storage/databases/main/end_to_end_keys.py
+++ b/synapse/storage/databases/main/end_to_end_keys.py
@@ -398,6 +398,10 @@ class EndToEndKeyWorkerStore(SQLBaseStore):
                 desc="set_e2e_fallback_key",
             )
 
+        await self.invalidate_cache_and_stream(
+            "get_e2e_unused_fallback_key_types", (user_id, device_id)
+        )
+
     @cached(max_entries=10000)
     async def get_e2e_unused_fallback_key_types(
         self, user_id: str, device_id: str