Do it in storage function
This commit is contained in:
parent
64a2acb161
commit
949629291c
|
@ -390,7 +390,7 @@ class ReplicationResource(Resource):
|
||||||
|
|
||||||
caches = request_streams.get("caches")
|
caches = request_streams.get("caches")
|
||||||
|
|
||||||
if caches is not None and current_position != caches:
|
if caches is not None:
|
||||||
updated_caches = yield self.store.get_all_updated_caches(
|
updated_caches = yield self.store.get_all_updated_caches(
|
||||||
caches, current_position, limit
|
caches, current_position, limit
|
||||||
)
|
)
|
||||||
|
|
|
@ -894,6 +894,9 @@ class SQLBaseStore(object):
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_all_updated_caches(self, last_id, current_id, limit):
|
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):
|
def get_all_updated_caches_txn(txn):
|
||||||
# We purposefully don't bound by the current token, as we want to
|
# We purposefully don't bound by the current token, as we want to
|
||||||
# send across cache invalidations as quickly as possible. Cache
|
# send across cache invalidations as quickly as possible. Cache
|
||||||
|
|
Loading…
Reference in New Issue