mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-19 18:04:13 -04:00
Add stream change cache
This commit is contained in:
parent
5d79d728f5
commit
304880d185
4 changed files with 34 additions and 1 deletions
|
@ -223,6 +223,18 @@ class DataStore(RoomMemberStore, RoomStore,
|
|||
"DeviceListFederationStreamChangeCache", device_list_max,
|
||||
)
|
||||
|
||||
curr_state_delta_prefill, min_curr_state_delta_id = self._get_cache_dict(
|
||||
db_conn, "current_state_delta_stream",
|
||||
entity_column="room_id",
|
||||
stream_column="stream_id",
|
||||
max_value=events_max, # As we share the stream id with events token
|
||||
limit=1000,
|
||||
)
|
||||
self._curr_state_delta_stream_cache = StreamChangeCache(
|
||||
"_curr_state_delta_stream_cache", min_curr_state_delta_id,
|
||||
prefilled_cache=curr_state_delta_prefill,
|
||||
)
|
||||
|
||||
cur = LoggingTransaction(
|
||||
db_conn.cursor(),
|
||||
name="_find_stream_orderings_for_times_txn",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue