Redis Dump 命令

Redis 教程 · 2019-03-06 17:58:19

Redis DUMP 命令用于序列化给定 key ,并返回被序列化的值。

语法

redis DUMP 命令基本语法如下:

redis 127.0.0.1:6379> DUMP KEY_NAME

可用版本

>= 2.6.0

返回值

如果 key 不存在,那么返回 nil 。 否则,返回序列化之后的值。

实例

首先,我们在 redis 中创建一个 key 并设置值。

redis> SET greeting "hello, dumping world!"
OK

现在使用 DUMP 序列化键值。

redis> DUMP greeting
"\x00\x15hello, dumping world!\x06\x00E\xa0Z\x82\xd8r\xc1\xde"

redis> DUMP not-exists-key
(nil)

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

查看所有标签

Web 2.0 Architectures

Web 2.0 Architectures

Duane Nickull、Dion Hinchcliffe、James Governor / O'Reilly / 2009 / USD 34.99

The "Web 2.0" phenomena has become more pervasive than ever before. It is impacting the very fabric of our society and presents opportunities for those with knowledge. The individuals who understand t......一起来看看 《Web 2.0 Architectures》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

随机密码生成器
随机密码生成器

多种字符组合密码

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码