-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(event cache): get the *most recent* pagination token, not th…
…e *oldest* one Whenever it needs to back-paginate, the event cache should start with the *most recent* backpagination token, not the oldest one. This isn't a functional change, until the persistent storage is enabled. The reason is that, currently, there is one previous-batch token alive; after it's used, it's replaced with another gap and the events it served to request from the server. When persistent storage will be enabled, we'll have situations like the one shown in the test code, where we can have multiple previous-batch token alive at the same time. In that case, we'll need to back-paginate from the most recent events to the least recent events, and not the other way around, or we'll have holes in the timeline that won't be filled until we got to the start of the timeline.
- Loading branch information
Showing
2 changed files
with
65 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters