We store key-values all time but I belive that the time to get these values have came :). Now we will look how to get values by providing keys. The simplest syntax in memcached is get operation.
get key1 [key2] [key3]
- get is the verb of the operation.
- key1 is the key of the value we want to get
- key2,key3,… are the keys we want to get. We can get multiple values with single get.
add poftut 100 4
VALUE poftut 4
As the first we add out key as we have learned before.
- get is the verb of the operation
- poftut is the key of the value
- VALUE is value options like name flag size
- test is the value we are looking for
- END means transaction is successfully ended.
When executed following output is given
$ python3 get