Skip to content

Generic key type #82

@dnaka91

Description

@dnaka91

I was wondering why the value was made generic with the introduction of Go generics, but the key not. A quick check in the code revealed that there are some parts of the API that rely on a string as key, but overall it seems possible to support other types.

The motivation behind this is, that we try to avoid unneeded GC overhead at work, and often we have an integer as key. By making the key generic, we could avoid the extra conversion to a string just to be able to lookup values in the cache.

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