diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index 0a2e78fd811edec6bb80661a6776acd7ea30b28d..029f6612e6ef37c30a391d50157ae6605dfcbed8 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