mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 18:03:53 +01:00
If the same as the earliest key, assume nothing has changed.
This commit is contained in:
parent
40431251cb
commit
3f5dd18bd4
1 changed files with 5 additions and 0 deletions
|
@ -49,6 +49,11 @@ class StreamChangeCache(object):
|
|||
cache_counter.inc_misses(self.name)
|
||||
return True
|
||||
|
||||
if stream_pos == self._earliest_known_stream_pos:
|
||||
# If the same as the earliest key, assume nothing has changed.
|
||||
cache_counter.inc_hits(self.name)
|
||||
return False
|
||||
|
||||
latest_entity_change_pos = self._entity_to_key.get(entity, None)
|
||||
if latest_entity_change_pos is None:
|
||||
cache_counter.inc_misses(self.name)
|
||||
|
|
Loading…
Reference in a new issue