Skip to content
Snippets Groups Projects
Commit bfde0760 authored by Erik Johnston's avatar Erik Johnston
Browse files

Increase cache hit ratio for push

We don't update the cache in all code paths, which causes subsequent
calls to miss the cache
parent d3862812
No related branches found
Tags v0.18.2-rc1
No related merge requests found
......@@ -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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment