Saturday, November 12, 2022

[FIXED] What does memcached "get" return in telnet?

Issue

When I query a key in memcached using telnet, I see something like this:

> get mykeyname
VALUE mykeyname 3 240396
{the key value}
END

What is the first line? I can see the keyword VALUE and the name of the key but don't understand what the integers mean, and I can't find this documented anywhere. My guess is that the second integer is the length of the data in bytes, but what is the first one?


Solution

As specified in the Memcached protocol, the first integer are the flags and the second integer is the size of the value in bytes.



Answered By - Sascha Trifunovic
Answer Checked By - Robin (PHPFixing Admin)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.