diff options
author | Erik Johnston <erikj@jki.re> | 2016-08-17 10:30:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-17 10:30:52 +0100 |
commit | 49043f5ff3173d49252aa40bc675f381bec41a33 (patch) | |
tree | a072857c29386f884b1a4f04bc60e772be5857cb /synapse | |
parent | Merge pull request #1015 from matrix-org/erikj/preview_url_fixes (diff) | |
parent | Do it in storage function (diff) | |
download | synapse-49043f5ff3173d49252aa40bc675f381bec41a33.tar.xz |
Merge pull request #1016 from matrix-org/erikj/short_circuit_cache
Don't update caches replication stream if tokens haven't advanced
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/storage/_base.py | 3 |
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 |