mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-18 00:39:18 -04:00
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)
This commit is contained in:
parent
21eeacc995
commit
cc21a431f3
11 changed files with 86 additions and 26 deletions
|
@ -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
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue