Version 2 by Steve Yen
on Jul 16, 2012 12:47.

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (2)

View Page History
h1. Requests

h2. Set With Meta


For deleteq with meta use opcode 0xa9.

h1. Responses

h2. Get With Meta

{code:none}
Byte/ 0 | 1 | 2 | 3 |
/ | | | |
|0 1 2 3 4 5 6 7|0 1 2 3 4 5 6 7|0 1 2 3 4 5 6 7|0 1 2 3 4 5 6 7|
+---------------+---------------+---------------+---------------+
0| 0x80 | 0xa0 | 0x00 | 0x05 |
+---------------+---------------+---------------+---------------+
4| 0x18 | 0x00 | 0x00 | 0x00 |
+---------------+---------------+---------------+---------------+
8| 0x00 | 0x00 | 0x00 | 0x1d |
+---------------+---------------+---------------+---------------+
12| 0xde | 0xad | 0xbe | 0xef |
+---------------+---------------+---------------+---------------+
16| 0x00 | 0x00 | 0x00 | 0x00 |
+---------------+---------------+---------------+---------------+
20| 0x00 | 0x00 | 0x00 | 0x00 |
+---------------+---------------+---------------+---------------+
24| 0x00 | 0x00 | 0x00 | 0x00 |
+---------------+---------------+---------------+---------------+
28| 0x00 | 0x00 | 0x00 | 0x00 |
+---------------+---------------+---------------+---------------+
32| 0x00 | 0x00 | 0x00 | 0x00 |
+---------------+---------------+---------------+---------------+
36| 0xbe | 0xef | 0xca | 0xfe |
+---------------+---------------+---------------+---------------+
40| 0xde | 0xad | 0xba | 0xbe |
+---------------+---------------+---------------+---------------+
44| 0xca | 0xfe | 0xba | 0xbe |
+---------------+---------------+---------------+---------------+
48| 0xde | 0xad | 0xbe | 0xef |
+---------------+---------------+---------------+---------------+

get with meta response
Field (offset) (value)
Magic (0) : 0x80
Opcode (1) : 0xa0
Key length (2,3) : 0x0005
Extra length (4) : 0x18
Data type (5) : 0x00
Vbucket (6,7) : 0x0000
Total body (8-11) : 0x0000001d == 0x18 + 5 + 0
Opaque (12-15): 0xdeadbeef
CAS (16-23): 0x0000000000000000
Flags (24-27): 0x00000000
Item Flags (28-21): 0x00000000
Expiration (32-35): 0x00000000
Seqno (36-43): 0xbeefcafedeadbabe
CAS (44-51): 0xcafebabedeadbeef
{code}