summary refs log tree commit diff
path: root/synapse/storage/_base.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-08-16 17:05:34 +0100
committerErik Johnston <erik@matrix.org>2016-08-16 17:05:34 +0100
commit949629291cbb71d55a549ef35287a75c1d5bb691 (patch)
treea072857c29386f884b1a4f04bc60e772be5857cb /synapse/storage/_base.py
parentDon't update caches replication stream if tokens haven't advanced (diff)
downloadsynapse-949629291cbb71d55a549ef35287a75c1d5bb691.tar.xz
Do it in storage function
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r--synapse/storage/_base.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index 0a2e78fd81..029f6612e6 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -894,6 +894,9 @@ class SQLBaseStore(object):
             )
 
     def get_all_updated_caches(self, last_id, current_id, limit):
+        if last_id == current_id:
+            return defer.succeed([])
+
         def get_all_updated_caches_txn(txn):
             # We purposefully don't bound by the current token, as we want to
             # send across cache invalidations as quickly as possible. Cache