Skip to content

Feature Request: allow custom commands via Cmder interface #3698

@fdimuccio

Description

@fdimuccio

I would like the ability to implement an HGetAll command with custom deserialization logic to unmarshal Redis responses directly into structs, avoiding the intermediate map[string]string allocation (as used in MapStringStringCmd).

Currently, this is not possible because redis.Cmder contains unexported methods, specifically readReply(*proto.Reader), which prevents implementing custom command types.

We're currently using radix, which allows custom deserialization and saves us significant allocations in hot paths. We would like to migrate to go-redis, but the inability to implement custom deserialization is a blocker for adoption.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions