Tuesday, 23 August 2016

Memcached: Delete key

‘delete’ command is used to delete a key from Memcached.

Syntax
delete key [noreply]

Argument
Description
key
Key to delete from Memcached.
noreply
It is optional, when you pass this parameter, server don’t send any reply back to you.

You may get following responses.

Response
Description
DELETED
Key deleted successfully
ERROR
Indicates an error, while deleting the key
NOT_FOUND
Indicates that key don’t exist


$ telnet 127.0.0.1 11211
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
set 123 0 900 8
Tutorial
STORED
get 123
VALUE 123 0 8
Tutorial
END
delete 123
DELETED
delete 123
NOT_FOUND



Previous                                                 Next                                                 Home

No comments:

Post a Comment