Redis 基础操作

时间:2023-03-09 01:59:12
Redis 基础操作

Redis 基础操作

1、ECHO message。

  Returns message.

  Redis 基础操作

2、PHING

  Returns PONG if no argument is provided, otherwise return a copy of the argument as a bulk. This command is often used to test if a connection is still alive, or to measure latency.

  Redis 基础操作

3、SELECT index

  切换到指定的数据库,数据库索引号 index 用数字值指定,以 0 作为起始索引值。

  默认使用 0 号数据库。

  Redis 基础操作

4、QUIT

  请求服务器关闭与当前客户端的连接。

  一旦所有等待中的回复(如果有的话)顺利写入到客户端,连接就会被关闭。

参考:http://redisdoc.com/connection/quit.html