-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Enable saving of command keys #3130
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
Conversation
command.go
Outdated
keys := []string{} | ||
|
||
switch cmd.Name() { | ||
case "mget": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach isn't scalable, each time we need a new type of extracting we have to add a command here. Cmder
is an interface that should be abstract as possible and should not contain any implementation specific (mget is an implementation specific in this case).
Cmder should return a keys, but shouldn't be aware about the keys position of specific command (this is implementation details), instead the specific command that implements this interface should define keys position for itself.
@vladvildanov , @ofekshenawa should we close this one? Can someone explain what was the need and the plan for this change? |
This PR enables saving the keys used by commands—especially multi-key commands—for use in CSC. |
Adds support for extracting and persisting the Redis keys used by each command—particularly multi‐key commands.
Key changes: