Skip to content

Doc refinements on run_pending_tasks #544

Description

@xd009642

I was having an issue recently where the cache size wasn't going down and I'd added some new expiry things (Time-to-idle and a value size based Expiry policy). But I was really confused because things weren't leaving the cache. But I also wasn't hitting the cache size limits so maybe hitting the size fixes that more but running https://docs.rs/moka/latest/moka/future/struct.Cache.html#method.run_pending_tasks was the answer. But it seems to lack prevalence in the docs. I did assume there would be a background thread/task doing upkeep on the cache, and from the changelog I see that was the case and is no longer true.

I'd be willing to help out with some PRs if you like, but just wanted to get some opinions. It feels like it would be good to have it more prevalent in the examples of usage to avoid similar mistakes.

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