Invalidate the cache when an olm fallback key is uploaded (#8501)

This commit is contained in:
Hubert Chathi 2020-10-08 13:24:46 -04:00 committed by GitHub
parent 7859c4d079
commit a97cec18bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 0 deletions

View file

@ -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