Skip to content

[Feature request] Expire after access LRU #359

@rasmuskl

Description

@rasmuskl

It would be great to be able to use "expire after access" in addition to the already implemented "expire after write" found in ConcurrentTlru.

My use case is resource optimization of unloading unused values, not cache duration which is what I have used the "expire after write" implementation for recently. If I use the "expire after write" implementation I end up running the same expensive loading code more often.

I could use the plain LRU but then I am always keeping close to capacity in memory which is results in high resource use.

Caffeine provides expireAfterAccess for the same scenarios: https://github.com/ben-manes/caffeine/wiki/Eviction#time-based

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions