summary refs log tree commit diff
path: root/synapse/storage/roommember.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-06-07 11:08:36 +0100
committerErik Johnston <erik@matrix.org>2017-06-07 11:08:36 +0100
commit6ba21bf2b8207e714d0d523379727bcf2c14684d (patch)
treea2f2d57ae54e6bbaa2ba4c4ead907497982fd5c5 /synapse/storage/roommember.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into erikj/state_fixup (diff)
downloadsynapse-6ba21bf2b8207e714d0d523379727bcf2c14684d.tar.xz
Comments
Diffstat (limited to 'synapse/storage/roommember.py')
-rw-r--r--synapse/storage/roommember.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py
index 7155bfdc69..8656455f6e 100644
--- a/synapse/storage/roommember.py
+++ b/synapse/storage/roommember.py
@@ -644,6 +644,10 @@ class RoomMemberStore(SQLBaseStore):
 
 
 class _JoinedHostsCache(object):
+    """Cache for joined hosts in a room that is optimised to handle updates
+    via state deltas.
+    """
+
     def __init__(self, store, room_id):
         self.store = store
         self.room_id = room_id
@@ -658,6 +662,11 @@ class _JoinedHostsCache(object):
 
     @defer.inlineCallbacks
     def get_destinations(self, state_entry):
+        """Get set of destinations for a state entry
+
+        Args:
+            state_entry(synapse.state._StateCacheEntry)
+        """
         if state_entry.state_group == self.state_group:
             defer.returnValue(frozenset(self.hosts_to_joined_users))