Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Add a cache to Iterator #63

Closed
2 tasks done
vweevers opened this issue May 23, 2018 · 0 comments · Fixed by #68
Closed
2 tasks done

Add a cache to Iterator #63

vweevers opened this issue May 23, 2018 · 0 comments · Fixed by #68
Assignees
Labels
upgrade guide Improvements or additions to upgrade guide(s)
Milestone

Comments

@vweevers
Copy link
Member

vweevers commented May 23, 2018

From #60 (comment):

Iterators should by default keep reading from the underlying IDB cursor, to fulfill the snapshot guarantee

  • Have the IDB cursor fill a cache (similar to how leveldown works with highWaterMark)
  • Have Iterator.prototype._next() read from the cache.

This cleanly separates the two mechanisms (IDB pushes, Iterator pulls).

@vweevers vweevers added this to the v3 milestone May 23, 2018
@vweevers vweevers self-assigned this May 23, 2018
@vweevers vweevers mentioned this issue May 23, 2018
@vweevers vweevers added the upgrade guide Improvements or additions to upgrade guide(s) label May 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
upgrade guide Improvements or additions to upgrade guide(s)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant