Skip to content

Request: adding an update_with #77

@nicoxxl

Description

@nicoxxl

I would like to add an  update_with or replace_with method to the cache.

The use case would be to be able to update atomically an entry with a closure/Fn type (and with the soft argument, don't affect "hotness").
It can be useful in cases where a cache is needed for reading but also can receive updates.

I can send a PR if it's a good idea.

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