Latest web development tutorials

Memcached get command

Memcached get command gets thevalue (data value) stored key (key)in, if key does not exist, it returns null.

grammar:

The basic get command syntax is as follows:

get key

A plurality of key separated by a space, as follows:

get key1 key2 key3

Parameters are as follows:

  • key: key key-value structure key, it is used to find the cache value.

Examples

In the following examples, we use w3big as the key, set the expiration time of 900 seconds.

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