Easy Tutorial
❮ Memcached Replace Data Memcached Clear Data ❯

Memcached delete Command

The Memcached delete command is used to delete an existing key.

Syntax:

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

delete key [noreply]

Parameter descriptions are as follows:

Example

In the following example, we use "tutorialpro" as the key with an expiration time set to 900 seconds. We then use the delete command to remove this key.

set tutorialpro 0 900 9
memcached
STORED
get tutorialpro
VALUE tutorialpro 0 9
memcached
END
delete tutorialpro
DELETED
get tutorialpro
END
delete tutorialpro
NOT_FOUND

Output

Output information explanations:

❮ Memcached Replace Data Memcached Clear Data ❯