Memcached gets 命令

Memcached 教程 · 2019-03-08 23:43:43

Memcached gets 命令获取带有 CAS 令牌存 的 value(数据值) ,如果 key 不存在,则返回空。

语法:

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

gets key

多个 key 使用空格隔开,如下:

gets key1 key2 key3

参数说明如下:

  • key:键值 key-value 结构中的 key,用于查找缓存值。

实例

在以下实例中,我们使用 codercto 作为 key,过期时间设置为 900 秒。

set codercto 0 900 9
memcached
STORED
gets codercto
VALUE codercto 0 9 1
memcached
END

在 使用 gets 命令的输出结果中,在最后一列的数字 1 代表了 key 为 codercto 的 CAS 令牌。

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

查看所有标签

Web Data Mining

Web Data Mining

Bing Liu / Springer / 2006-12-28 / USD 59.95

Web mining aims to discover useful information and knowledge from the Web hyperlink structure, page contents, and usage data. Although Web mining uses many conventional data mining techniques, it is n......一起来看看 《Web Data Mining》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

html转js在线工具
html转js在线工具

html转js在线工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换