summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-05-13 11:41:23 +0100
committerErik Johnston <erik@matrix.org>2016-05-13 11:41:23 +0100
commit6da7f39d952f7c8bb805d8b863c737d98b240217 (patch)
tree410e71c8161c93b4ea3cd7486e2b3e7b33d7a285 /synapse
parentMerge pull request #776 from matrix-org/markjh/lazy_signing_key (diff)
downloadsynapse-6da7f39d952f7c8bb805d8b863c737d98b240217.tar.xz
Use tree cache for get_linearized_receipts_for_room
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/receipts.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/receipts.py b/synapse/storage/receipts.py

index 935fc503d9..669fc8ada2 100644 --- a/synapse/storage/receipts.py +++ b/synapse/storage/receipts.py
@@ -100,7 +100,7 @@ class ReceiptsStore(SQLBaseStore): defer.returnValue([ev for res in results.values() for ev in res]) - @cachedInlineCallbacks(num_args=3, max_entries=5000) + @cachedInlineCallbacks(num_args=3, max_entries=5000, lru=True, tree=True) def get_linearized_receipts_for_room(self, room_id, to_key, from_key=None): """Get receipts for a single room for sending to clients. @@ -232,7 +232,7 @@ class ReceiptsStore(SQLBaseStore): self.get_receipts_for_user.invalidate, (user_id, receipt_type) ) # FIXME: This shouldn't invalidate the whole cache - txn.call_after(self.get_linearized_receipts_for_room.invalidate_all) + txn.call_after(self.get_linearized_receipts_for_room.invalidate_many, (room_id,)) txn.call_after( self._receipts_stream_cache.entity_has_changed, @@ -367,7 +367,7 @@ class ReceiptsStore(SQLBaseStore): self.get_receipts_for_user.invalidate, (user_id, receipt_type) ) # FIXME: This shouldn't invalidate the whole cache - txn.call_after(self.get_linearized_receipts_for_room.invalidate_all) + txn.call_after(self.get_linearized_receipts_for_room.invalidate_many, (room_id,)) self._simple_delete_txn( txn,