Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Memcached get command


May 17, 2021 Memcached



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

Grammar:

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 below:

  • Key: Key in the key-value structure to find cached values.

Instance

In the following example, we use w3cschool as key, with an expiration time set to 900 seconds.

set w3cschool 0 900 9
memcached
STORED
get w3cschool
VALUE w3cschool 0 9
memcached
END