1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
#<cldoc:ExtKeys>
Key dump extesion
=================
yrmcds provides an extension to memcached protocol to dump existing keys.
Text protocol
-------------
The general description about the text protocol is available at:
https://github.com/memcached/memcached/blob/master/doc/protocol.txt
The key dump command syntax is:
keys [<prefix>]\r\n
where `prefix` is the prefix string of dumping keys.
If `prefix` is omitted, all keys will be dumped.
After this command, the client expects zero or more values, each of
which is received as a text line. After all the items have been
transmitted, the server sends the string
END\r\n
to indicate the end of response.
Each item sent by the server looks like this:
VALUE <key>\r\n
where `key` is a key having the given prefix.
Binary protocol
---------------
The general description about the binary protocol is available at:
https://code.google.com/p/memcached/wiki/MemcacheBinaryProtocol
This extension introduces a new opcode:
0x50 (Keys)
`Keys` Request:
- MUST NOT have extras.
- MAY have key.
- MUST NOT have value.
Successful response of `Keys` consists of a series of these responses:
- MUST NOT have extras.
- MUST have key.
- MUST NOT have value.
followed by an empty response (i.e., key length is 0).
|