gkvlite
gkvlite copied to clipboard
manually evict items from memory
I would like to be able to evict an item (or at least its value) from memory.
Reopening a database as advised in https://github.com/steveyen/gkvlite/issues/4#issuecomment-56056262 is suboptimal, as it introduces long pauses and memory usage is still rather high, because items are stored in memory all the time until I call Write
, Flush
and reopen the database.
Can you provide the following methods, please?
func (t *Collection) EvictValue(i *Item)
func (t *Collection) EvictItem(i *Item)
I would call one of them after I call Set
or Get
to reduce memory usage.