mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:06:07 -04:00
Faster push rule calculation via push specific cache
We add a push rule specific cache that ensures that we can reuse calculated push rules appropriately when a user join/leaves.
This commit is contained in:
parent
ace23463c5
commit
66d8ffabbd
3 changed files with 249 additions and 47 deletions
|
@ -54,6 +54,8 @@ class MessageHandler(BaseHandler):
|
|||
# This is to stop us from diverging history *too* much.
|
||||
self.limiter = Limiter(max_count=5)
|
||||
|
||||
self.action_generator = ActionGenerator(self.hs)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def purge_history(self, room_id, event_id):
|
||||
event = yield self.store.get_event(event_id)
|
||||
|
@ -590,8 +592,7 @@ class MessageHandler(BaseHandler):
|
|||
"Changing the room create event is forbidden",
|
||||
)
|
||||
|
||||
action_generator = ActionGenerator(self.hs)
|
||||
yield action_generator.handle_push_actions_for_event(
|
||||
yield self.action_generator.handle_push_actions_for_event(
|
||||
event, context
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue