Returns a name of a random key, or NULL if current db is empty. */
| 2434 | |
| 2435 | /* Returns a name of a random key, or NULL if current db is empty. */ |
| 2436 | RedisModuleString *RM_RandomKey(RedisModuleCtx *ctx) { |
| 2437 | robj *key = dbRandomKey(ctx->client->db); |
| 2438 | autoMemoryAdd(ctx,REDISMODULE_AM_STRING,key); |
| 2439 | return key; |
| 2440 | } |
| 2441 | |
| 2442 | /* -------------------------------------------------------------------------- |
| 2443 | * ## Key API for String type |
nothing calls this directly
no test coverage detected