Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

callback_on_evict doesn't provide value_size #229

@kilobyte

Description

@kilobyte

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions