By default, we assume the key is the first argument after the command name, with known exceptions. It's not correct in some cases and it's not compatible with future Redis commands.
A better fallback would be to ask Redis about the keys in a command. It can be done using the COMMAND command (with logic for all commands that can be cached) or COMMAND GETKEYS for a specific command string, if the syntax is too complex.
By default, we assume the key is the first argument after the command name, with known exceptions. It's not correct in some cases and it's not compatible with future Redis commands.
A better fallback would be to ask Redis about the keys in a command. It can be done using the COMMAND command (with logic for all commands that can be cached) or COMMAND GETKEYS for a specific command string, if the syntax is too complex.