
十三、Memcached gets 命令
Memcached gets 命令获取带有 CAS 令牌存 的 value(数据值) ,
语法
gets key
多个 key 使用空格隔开:
gets key1 key2 key3
key:键值 key-value 结构中的 key,用于查找缓存值
返回结果中,最后一列的数字为 CAS 令牌
如果 key 不存在,则返回空
范例
使用 gets 命令的输出结果中,在最后一列的数字 1 代表了 key 为 云遇未晚 的 CAS 令牌
只 gets 一个 key
flush_all
OK
set site 0 1000 11
a
STORED
set age 0 1000 2
28
STORED
gets site
VALUE site 0 11 18
a
END
gets 多个 key
flush_all
OK
set site 0 1000 11
a
STORED
set age 0 1000 2
28
STORED
gets site age
VALUE site 0 11 18
a
VALUE age 0 2 19
28
END
gets 多个 key 中有一个 key 不存在
那么不存在的那个 key 则不会返回任何信息
flush_all
OK
set site 0 1000 11
a
STORED
set age 0 1000 2
28
STORED
gets site age name
VALUE site 0 11 18
a
VALUE age 0 2 19
28
END
gets 一个不存在的 key
flush_all
OK
gets site
END
感谢您的来访,获取更多精彩文章请收藏本站。









![羊了个羊抖音微信小程序苹果安卓通用(包括话题PK刷通关)[已失效]-456源码网](https://cnyma.cn/wp-content/uploads/2022/09/2022091801214643-461x1024.jpg)

![[本站同款主题]子比破解版主题最新V6.5.1破解免授权版(安装即可用)-456源码网](https://cnyma.cn/wp-content/uploads/2022/07/Screenshot_2022-07-27-17-58-33-889_com.android.browser-461x1024.jpg)
![羊了个羊抖音微信小程序_安卓苹果通用刷通关网页源码(可刷话题PK)[已失效仅供参考]-456源码网](https://cnyma.cn/wp-content/uploads/2022/09/2022091802141819-461x1024.jpg)

暂无评论内容