summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2020-07-31 13:58:42 +0100
committerBrendan Abolivier <babolivier@matrix.org>2020-07-31 13:58:42 +0100
commit79d991eff060abaa074ef23201f0e68cc8228e7e (patch)
treed491725572e055560779465d951f0ccc8bb0ce4d /synapse
parentMerge branch 'develop' of github.com:matrix-org/synapse into babolivier/new_p... (diff)
downloadsynapse-79d991eff060abaa074ef23201f0e68cc8228e7e.tar.xz
Fix cache invalidation calls
Diffstat (limited to 'synapse')
-rw-r--r--synapse/replication/slave/storage/push_rule.py2
-rw-r--r--synapse/storage/data_stores/main/push_rule.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/synapse/replication/slave/storage/push_rule.py b/synapse/replication/slave/storage/push_rule.py
index 23ec1c5b11..6bebd4d5c1 100644
--- a/synapse/replication/slave/storage/push_rule.py
+++ b/synapse/replication/slave/storage/push_rule.py
@@ -34,7 +34,7 @@ class SlavedPushRuleStore(SlavedEventStore, PushRulesWorkerStore):
         if stream_name == PushRulesStream.NAME:
             self._push_rules_stream_id_gen.advance(token)
             for row in rows:
-                self.get_push_rules_for_user.invalidate((row.user_id,))
+                self._get_push_rules_for_user.invalidate((row.user_id,))
                 self.get_push_rules_enabled_for_user.invalidate((row.user_id,))
                 self.push_rules_stream_cache.entity_has_changed(row.user_id, token)
         return super().process_replication_rows(stream_name, instance_name, token, rows)
diff --git a/synapse/storage/data_stores/main/push_rule.py b/synapse/storage/data_stores/main/push_rule.py
index 861050814d..85cd24ce72 100644
--- a/synapse/storage/data_stores/main/push_rule.py
+++ b/synapse/storage/data_stores/main/push_rule.py
@@ -768,7 +768,7 @@ class PushRuleStore(PushRulesWorkerStore):
 
         self.db.simple_insert_txn(txn, "push_rules_stream", values=values)
 
-        txn.call_after(self.get_push_rules_for_user.invalidate, (user_id,))
+        txn.call_after(self._get_push_rules_for_user.invalidate, (user_id,))
         txn.call_after(self.get_push_rules_enabled_for_user.invalidate, (user_id,))
         txn.call_after(
             self.push_rules_stream_cache.entity_has_changed, user_id, stream_id