Can someone please explain how the following Redis command gives me back the content? What do the individual numbered lines are responsible for?
1: *3
2: $4
3: hget
4: $21
5: zc:k:b23_cache_config
6: $1
7: d
8: $5264$5264
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The message format is called the unified request protocol.
An asterisk
*denotes how many arguments are to be expected in this request. So,*3is for three arguments.A dollar sign
$denotes how many bytes are to be expected in the argument. So,$1is for one byte.The raw message from your example would look like:
This particular request will return a
bulk reply response, which looks like:If the requested key doesn’t exist then the reply will be: