Skip to content

Provide access to the reference of Key? #515

@kxxt

Description

@kxxt

The APIs provided by moka::sync::Cache seems preventing access to &K. Is it intentional?

It is useful to access &K when K is Arc<str> for example, to clone it.

For my use case, I am building a hashset like cache of ArcStr using Cache<ArcStr, ()>.
Not being able to access &K prevents such use cases.

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