Redis RANDOMKEY 命令

更新时间: 2019-07-07 15:54

Redis RANDOMKEY 命令从当前数据库中随机返回一个 key 。

语法

redis 127.0.0.1:6379> RANDOMKEY 

返回值

  • 当数据库不为空时,返回一个 key 。
  • 当数据库为空时,返回 nil (windows 系统返回 null)。

实例

127.0.0.1:6379> keys *
1) "key3"
2) "domain"
3) "key5"
4) "web_name"
5) "key2"
6) "domain1"
7) "key6"
8) "key4"
127.0.0.1:6379> randomkey
"web_name"
127.0.0.1:6379> randomkey
"key3"
127.0.0.1:6379> randomkey
"key2"

查看更多 Redis key 命令

Approximation Algorithms

Approximation Algorithms

Vijay V. Vazirani / Springer / 2001-07-02 / USD 54.95

'This book covers the dominant theoretical approaches to the approximate solution of hard combinatorial optimization and enumeration problems. It contains elegant combinatorial theory, useful and inte......一起来看看 《Approximation Algorithms》 这本书的介绍吧!

JSON 在线解析

JSON 在线解析

在线 JSON 格式化工具

HTML 编码/解码

HTML 编码/解码

HTML 编码/解码

Base64 编码/解码

Base64 编码/解码

Base64 编码/解码