Memcached Append Operation with Python Example
Append operation is simple and made on existing key-value. Newly provided value will be added at the end of existing value. Syntax is the same as other commands.
1 2 |
append key flags expiretime bytes value |
- append the operation
- key the key where its value will be appended
- flag as you know
- expiretime how much time key-value will be hold
- bytes the size of the value
Let’s add some data for start
1 2 3 |
add poftut 100 4 test STORED |
Now append more data please
1 2 3 |
append poftut 100 4 neww STORED |
- append as we guess operation
- poftut is existing key for append
- 0 flags,flags
- 100 time to hold new key-value
- 4 appended data size
- neww is appended value
- STORED means append is successfully complated
Check new value for poftut
1 2 3 4 |
get poftut VALUE poftut 8 testneww END |
Python Application