summary refs log tree commit diff
path: root/synapse/storage/account_data.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-02-10 14:12:48 +0000
committerErik Johnston <erik@matrix.org>2016-02-10 14:12:48 +0000
commite66d0bd03abc75b5a0445acadc776ba23e1090ba (patch)
treed73f7c0c2621a27c1637223213a930e40140728d /synapse/storage/account_data.py
parentUpdate CHANGES (diff)
parentMerge pull request #569 from matrix-org/erikj/initial_sync (diff)
downloadsynapse-e66d0bd03abc75b5a0445acadc776ba23e1090ba.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into release-v0.13.0
Diffstat (limited to 'synapse/storage/account_data.py')
-rw-r--r--synapse/storage/account_data.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/synapse/storage/account_data.py b/synapse/storage/account_data.py
index ed6587429b..b8387fc500 100644
--- a/synapse/storage/account_data.py
+++ b/synapse/storage/account_data.py
@@ -14,7 +14,6 @@
 # limitations under the License.
 
 from ._base import SQLBaseStore
-from synapse.util.caches.stream_change_cache import StreamChangeCache
 from twisted.internet import defer
 
 import ujson as json
@@ -24,14 +23,6 @@ logger = logging.getLogger(__name__)
 
 
 class AccountDataStore(SQLBaseStore):
-    def __init__(self, hs):
-        super(AccountDataStore, self).__init__(hs)
-
-        self._account_data_stream_cache = StreamChangeCache(
-            "AccountDataAndTagsChangeCache",
-            self._account_data_id_gen.get_max_token(None),
-            max_size=10000,
-        )
 
     def get_account_data_for_user(self, user_id):
         """Get all the client account_data for a user.
@@ -166,6 +157,10 @@ class AccountDataStore(SQLBaseStore):
                     "content": content_json,
                 }
             )
+            txn.call_after(
+                self._account_data_stream_cache.entity_has_changed,
+                user_id, next_id,
+            )
             self._update_max_stream_id(txn, next_id)
 
         with (yield self._account_data_id_gen.get_next(self)) as next_id: