You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.
I expect that most of the time an user writes an on_evict callback, it's to do something to the entry that's being evicted. That usually requires knowing the value's size.
With our current API, this requires two gets, going through the index and repl twice. That's a waste of time — we already know value_size.
It'd be nice to pass it to the callback. Alas, that'd be an API break...
I'm thus saving this as a note we may want to consider in case we'd want to break the API before 1.0. Another option would be to have a callback2, but that's ugly.
The text was updated successfully, but these errors were encountered:
I expect that most of the time an user writes an on_evict callback, it's to do something to the entry that's being evicted. That usually requires knowing the value's size.
With our current API, this requires two
get
s, going through the index and repl twice. That's a waste of time — we already know value_size.It'd be nice to pass it to the callback. Alas, that'd be an API break...
I'm thus saving this as a note we may want to consider in case we'd want to break the API before 1.0. Another option would be to have a callback2, but that's ugly.
The text was updated successfully, but these errors were encountered: