Memcached gets command
Memcached gets command gets the value(data value) with CAS token stored. If the key does not exist, it returns empty.
Syntax:
The basic syntax format of the gets command is as follows:
gets key
Multiple keys are separated by spaces, as follows:
gets key1 key2 key3
Parameter description is as follows:
key: The key in the key-value structure is used to find cached values.
Example
In the following example, we use php as the key and the expiration time is set to 900 seconds.
set php 0 900 9 memcached STORED gets php VALUE php 0 9 1 memcached END
In the output of the gets command, the number 1 in the last column represents the CAS token with the key php.