From 8f66fe639211988f66778d6b8a40a2a5fd2cfaa1 Mon Sep 17 00:00:00 2001
From: Erik Johnston <erik@matrix.org>
Date: Thu, 21 Jan 2016 15:02:07 +0000
Subject: [PATCH] Cache get_unread_event_push_actions_by_room_for_user

---
 synapse/storage/event_push_actions.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/synapse/storage/event_push_actions.py b/synapse/storage/event_push_actions.py
index 6b7cebc9ce..aa61cf5569 100644
--- a/synapse/storage/event_push_actions.py
+++ b/synapse/storage/event_push_actions.py
@@ -15,6 +15,7 @@
 
 from ._base import SQLBaseStore
 from twisted.internet import defer
+from synapse.util.caches.descriptors import cachedInlineCallbacks
 
 import logging
 import ujson as json
@@ -46,7 +47,7 @@ class EventPushActionsStore(SQLBaseStore):
             values
         )
 
-    @defer.inlineCallbacks
+    @cachedInlineCallbacks(num_args=3)
     def get_unread_event_push_actions_by_room_for_user(
             self, room_id, user_id, last_read_event_id
     ):
-- 
GitLab