Memcached delete 命令

Memcached 教程 · 2019-03-09 05:57:45

Memcached delete 命令用于删除已存在的 key(键)。

语法:

delete 命令的基本语法格式如下:

delete key [noreply]

参数说明如下:

  • key:键值 key-value 结构中的 key,用于查找缓存值。
  • noreply(可选): 该参数告知服务器不需要返回数据

实例

在以下实例中,我们使用 codercto 作为 key,过期时间设置为 900 秒。之后我们使用 delete 命令删除该 key。

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

输出

输出信息说明:

  • DELETED:删除成功。
  • ERROR:语法错误或删除失败。
  • NOT_FOUND:key 不存在。

点击查看所有 Memcached 教程 文章: https://codercto.com/courses/l/34.html

查看所有标签

Using Google App Engine

Using Google App Engine

Charles Severance / O'Reilly Media / 2009-5-23 / USD 29.99

With this book, you can build exciting, scalable web applications quickly and confidently, using Google App Engine - even if you have little or no experience in programming or web development. App Eng......一起来看看 《Using Google App Engine》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具