randomKey 命令/方法/函数

Description

Returns a random key.

返回一个随机的KEY。


Parameters

None.


Return value

STRING: an existing key in redis.

STRING:一个存在于REDIS中的KEY


Example

$key = $redis->randomKey();

$surprise = $redis->get($key);  // who knows what's in there.