Easy Tutorial
❮ Memcached Install Memcached Tutorial ❯

Memcached set Command

The Memcached set command is used to store a value in the specified key.

If the key already exists, this command can update the original data associated with that key, thus serving an update function.

Syntax:

The basic syntax format for the set command is as follows:

set key flags exptime bytes [noreply] 
value

Parameter descriptions are as follows:

Example

In the following example, we set:

Output

If the data is set successfully, the output will be:

STORED

Output information explanation:

❮ Memcached Install Memcached Tutorial ❯