Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Memcached get Command

Memcached get Command

The Memcached get command retrieves the value stored in key The value (data value) , and if the key does not exist, it returns empty.

Syntax:

The basic syntax format of the get command is as follows:



get key

Multiple keys are separated by spaces, as follows:



get key1 key2 key3

The parameters are described as follows:

Example

In the following example, we use runoob as the key with an expiration time of 900 seconds.



set runoob 0 900 9

memcached

STORED

get runoob

VALUE runoob 0 9

memcached

END