turbofish-org / merk

High-performance Merkle key/value store
Apache License 2.0
226 stars 36 forks source link

Cache/prune option #21

Closed mappum closed 1 month ago

mappum commented 5 years ago

There is currently no API for controlling the pruning strategy, it's just a constant number of tree levels to keep: https://github.com/nomic-io/merk/blob/develop/src/merk/mod.rs#L205

Pruning based on tree levels is a pretty simple strategy and eventually we can support more (e.g. based on counting frequency of updates/reads), but for now we'll just take an optional parameter for number of levels somewhere.

mappum commented 1 month ago

This is now controllable though the Commit trait.