Skip to content

Cache memory limit with weigher function #572

@jiangzhe

Description

@jiangzhe

My use case is to limit cache memory usage.
I found an old issue related to this topic: #201
In that thread, an approach of weigher function with the formula size_of(key) + size_of(value) + overhead is proposed.
I wonder if this information is still up-to-date and how to calculate overhead based on current codebase?
I think it would be very useful to put this common use case in document and add some helper functions (overhead on different setting). I'd be happy to help if author has no bandwidth on it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions