Skip to content

items are not pro-actively pruned out as they age #3

@kirillgroshkov

Description

@kirillgroshkov

items are not pro-actively pruned out as they age

I'm thinking about memory leaks in this case if LRU is used on a server and cache key is something time based (e.g "today"). In this scenario old keys (when today has moved to the next day) will never be accessed (neither set or get), so never pruned. How would you solve it?

I see one simple/stupid solution to do like setInterval that does cache.clear() once in a while. But that would clear all items, not only stale.

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