summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-03-04 16:19:42 +0000
committerMark Haines <mark.haines@matrix.org>2016-03-04 16:19:42 +0000
commitdeda48068c24083750a9bfc21d114c12e8347969 (patch)
tree93a290d5f169ddfdfc33b32cebc3ecd07d462640
parents/stream_ordering/event_stream_ordering/ in push (diff)
downloadsynapse-deda48068c24083750a9bfc21d114c12e8347969.tar.xz
prefill the push rules stream change cache
-rw-r--r--synapse/storage/__init__.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 7b7b03d052..ab2f115adf 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -160,9 +160,16 @@ class DataStore(RoomMemberStore, RoomStore,
             prefilled_cache=presence_cache_prefill
         )
 
+        push_rules_prefill, push_rules_id = self._get_cache_dict(
+            db_conn, "presence_stream",
+            entity_column="user_id",
+            stream_column="stream_id",
+            max_value=self._push_rules_stream_id_gen.get_max_token()[0],
+        )
+
         self.push_rules_stream_cache = StreamChangeCache(
-            "PushRulesStreamChangeCache",
-            self._push_rules_stream_id_gen.get_max_token()[0],
+            "PushRulesStreamChangeCache", push_rules_id,
+            prefilled_cache=push_rules_prefill,
         )
 
         super(DataStore, self).__init__(hs)