Memcached get Command
The Memcached get command retrieves the value stored in the key. If the key does not exist, it returns null.
Syntax:
The basic syntax for the get command is as follows:
get key
Multiple keys are separated by spaces, as shown below:
get key1 key2 key3
Parameter explanations are as follows:
- key: The key in the key-value structure used to find the cached value.
Example
In the following example, we use "tutorialpro" as the key with an expiration time set to 900 seconds.
set tutorialpro 0 900 9
memcached
STORED
get tutorialpro
VALUE tutorialpro 0 9
memcached
END