Skip to content

Add ability to retrieve result of SMEMBERS as map[string]struct{} #666

Closed
@laouji

Description

Despite not having a key/value structure, in a lot of ways redis sets are more like maps than they are slices (no order, no duplicates, etc).
In order to make it easier to implement caches that can also mock the functionality of SISMEMBER using in memory data, it would be useful to also have a version of SMEMBERS that returns the data as map[string]struct{} so that the caller doesn't have to remap the data themselves when fetching the data from redis.

I would be happy to make a PR if there is any interest, but I thought I'd bring it up and see what kind of reaction this would get.

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