diff options
author | Nick Mills-Barrett <nick@beeper.com> | 2022-07-15 11:30:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-15 09:30:46 +0000 |
commit | cc21a431f3bdb353427c3242e49b1941a51175b3 (patch) | |
tree | 930cbce45f3cf0433db6802431f19abc433101fa /synapse/storage/databases/main/events.py | |
parent | Federation Sender & Appservice Pusher Stream Optimisations (#13251) (diff) | |
download | synapse-cc21a431f3bdb353427c3242e49b1941a51175b3.tar.xz |
Async get event cache prep (#13242)
Some experimental prep work to enable external event caching based on #9379 & #12955. Doesn't actually move the cache at all, just lays the groundwork for async implemented caches. Signed off by Nick @ Beeper (@Fizzadar)
Diffstat (limited to 'synapse/storage/databases/main/events.py')
-rw-r--r-- | synapse/storage/databases/main/events.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/databases/main/events.py b/synapse/storage/databases/main/events.py index eb4efbb93c..fa2266ba20 100644 --- a/synapse/storage/databases/main/events.py +++ b/synapse/storage/databases/main/events.py @@ -1669,9 +1669,9 @@ class PersistEventsStore: if not row["rejects"] and not row["redacts"]: to_prefill.append(EventCacheEntry(event=event, redacted_event=None)) - def prefill() -> None: + async def prefill() -> None: for cache_entry in to_prefill: - self.store._get_event_cache.set( + await self.store._get_event_cache.set( (cache_entry.event.event_id,), cache_entry ) |