Invalidate get_earliest_token_for_stats cache as required.

Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
This commit is contained in:
Olivier Wilkinson (reivilibre) 2019-08-27 14:34:20 +01:00
parent 07c267c516
commit 44d3c2e80b

View file

@ -433,6 +433,7 @@ class StatsStore(StateDeltasStore):
elif complete_with_stream_id is not None:
absolute_fields = absolute_fields.copy()
absolute_fields["completed_delta_stream_id"] = complete_with_stream_id
self.get_earliest_token_for_stats.invalidate(stats_type, stats_id)
# first upsert the `_current` table
self._upsert_with_additive_relatives_txn(