Skip to content

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

Closed

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.

Activity

  1. changed the title [-]Clear up to a certain weight[/-] [+]Reduce cache size / clear up to a certain weight[/+] on Oct 3, 2025
  2. arthurprs commented on Oct 6, 2025

    @arthurprs
    Owner

    Released as part of 0.6.17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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