Skip to content
Snippets Groups Projects
Commit 3f5dd18b authored by Erik Johnston's avatar Erik Johnston
Browse files

If the same as the earliest key, assume nothing has changed.

parent 40431251
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment