summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-07-17 09:42:27 +0100
committerGitHub <noreply@github.com>2017-07-17 09:42:27 +0100
commit514c2d3c4ddbf70cac371ea5d12bf6fea2e0c996 (patch)
treee39c1b6f922aaf5434a1007f88f5a480d32d891d
parentMerge pull request #2366 from matrix-org/erikj/push_metrics (diff)
parentIncrease cache hit ratio for push (diff)
downloadsynapse-514c2d3c4ddbf70cac371ea5d12bf6fea2e0c996.tar.xz
Merge pull request #2371 from matrix-org/erikj/push_cache_hit
Increase cache hit ratio for push
-rw-r--r--synapse/push/bulk_push_rule_evaluator.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/push/bulk_push_rule_evaluator.py b/synapse/push/bulk_push_rule_evaluator.py
index 9134969553..b0d64aa6c4 100644
--- a/synapse/push/bulk_push_rule_evaluator.py
+++ b/synapse/push/bulk_push_rule_evaluator.py
@@ -316,6 +316,14 @@ class RulesForRoom(object):
                 yield self._update_rules_with_member_event_ids(
                     ret_rules_by_user, missing_member_event_ids, state_group, event
                 )
+            else:
+                # The push rules didn't change but lets update the cache anyway
+                self.update_cache(
+                    self.sequence,
+                    members={},  # There were no membership changes
+                    rules_by_user=ret_rules_by_user,
+                    state_group=state_group
+                )
 
         if logger.isEnabledFor(logging.DEBUG):
             logger.debug(