Skip to content

Reduce cache size / clear up to a certain weight #84

@praveenperera

Description

@praveenperera

I'm currently using this as the backing for a disk cache, and sometimes I want to clear out x number of bytes. I'm already using custom weighter and lifecycle, my question is, is there way to say "clear out xx weight units".

I think I could use retain for this, but I'm not sure what order the entries are returned in, if it returns the entries in the order that they would be evicted in that would be perfect, even if it was eviction reverse order it would be fine too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions