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.

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

add poftut 0 100 4 
test 
STORED

Now append more data please

append poftut 0 100 4 
neww 
STORED
  • append as we guess operation
  • poftut is existing key for append
  • flags,flags
  • 100 time to hold new key-value
  • appended data size
  • neww  is appended value
  • STORED means append is successfully complated

Check new value for poftut

get poftut 
VALUE poftut 0 8 
testneww 
END

Python Application

 

 

Leave a Comment