summary refs log tree commit diff
path: root/synapse/storage/signatures.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-03-01 17:32:58 +0000
committerGitHub <noreply@github.com>2018-03-01 17:32:58 +0000
commit1773df06327677a1d9111c18571d5e44be2b2d47 (patch)
tree258e2d147ef70bb5039601e38436ac37d6cc94a3 /synapse/storage/signatures.py
parentMerge pull request #2927 from matrix-org/erikj/read_marker_caches (diff)
parentRemove unused DataStore (diff)
downloadsynapse-1773df06327677a1d9111c18571d5e44be2b2d47.tar.xz
Merge pull request #2925 from matrix-org/erikj/split_sig_fed
Split out SignatureStore and EventFederationStore
Diffstat (limited to 'synapse/storage/signatures.py')
-rw-r--r--synapse/storage/signatures.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/synapse/storage/signatures.py b/synapse/storage/signatures.py
index 67d5d9969a..9e6eaaa532 100644
--- a/synapse/storage/signatures.py
+++ b/synapse/storage/signatures.py
@@ -22,12 +22,12 @@ from synapse.crypto.event_signing import compute_event_reference_hash
 from synapse.util.caches.descriptors import cached, cachedList
 
 
-class SignatureStore(SQLBaseStore):
-    """Persistence for event signatures and hashes"""
-
+class SignatureWorkerStore(SQLBaseStore):
     @cached()
     def get_event_reference_hash(self, event_id):
-        return self._get_event_reference_hashes_txn(event_id)
+        # This is a dummy function to allow get_event_reference_hashes
+        # to use its cache
+        raise NotImplementedError()
 
     @cachedList(cached_method_name="get_event_reference_hash",
                 list_name="event_ids", num_args=1)
@@ -74,6 +74,10 @@ class SignatureStore(SQLBaseStore):
         txn.execute(query, (event_id, ))
         return {k: v for k, v in txn}
 
+
+class SignatureStore(SignatureWorkerStore):
+    """Persistence for event signatures and hashes"""
+
     def _store_event_reference_hashes_txn(self, txn, events):
         """Store a hash for a PDU
         Args: