Home > Database > Redis > Detailed explanation of redis command [With Redis command operation manual]

Detailed explanation of redis command [With Redis command operation manual]

藏色散人
Release: 2020-08-12 14:50:01
Original
2722 people have browsed it

The following Redis tutorial column will introduce redis commands to you. I hope it will be helpful to friends in need!

Detailed explanation of redis command [With Redis command operation manual]

Note: Due to space limitations, the following only briefly summarizes the redis command. Please move to the "Redis Command Operation Chinese Manual", You can view and study online!

Redis command:

  • Redis key

The Redis key command is used to manage redis keys.

The basic syntax of the Redis key command is as follows:

redis 127.0.0.1:6379> COMMAND KEY_NAME
Copy after login
Copy after login
  • Redis string (String)

Redis character Related commands of string data type are used to manage redis string values. The basic syntax is as follows:

redis 127.0.0.1:6379> COMMAND KEY_NAME
Copy after login
Copy after login
  • Redis Hash

Redis Hash is a mapping table of string type fields and values. Hash is particularly suitable for storing objects.

  • Redis List (List)

Redis list is a simple list of strings, sorted in insertion order. You can add an element to the head (left) or tail (right) of the guide list

  • Redis Collection (Set)

Redis's Set is an unordered collection of string type. Set members are unique, which means that duplicate data cannot appear in the set

  • Redis ordered set(sorted set)

Redis ordered set, like a set, is also a collection of string type elements and does not allow duplicate members.

  • Redis HyperLogLog

Redis added the HyperLogLog structure in version 2.8.9.

  • Redis publish and subscribe

Redis publish and subscribe (pub/sub) is a message communication mode: sender (pub) Send a message and the subscriber (sub) receives the message.

  • Redis Transaction

Redis transaction can execute multiple commands at one time and comes with the following two important guarantees:

A transaction is a single isolated operation: all commands in the transaction will be serialized and executed in order. During the execution of the transaction, it will not be interrupted by command requests sent by other clients.

A transaction is an atomic operation: either all commands in the transaction are executed, or none of them are executed.

  • Redis script

Redis script uses the Lua interpreter to execute the script. Reids version 2.6 provides built-in support for the Lua environment. A common command to execute scripts is EVAL.

  • Redis connection

The Redis connection command is mainly used to connect to the redis service.

  • Redis Server

Redis server commands are mainly used to manage the redis service.

  • Redis Ping command

The Redis Ping command uses the client to send a PING to the Redis server. If the server is operating normally, it will Returns a PONG.

Related recommendations: "redis download and install"

The above is the detailed content of Detailed explanation of redis command [With Redis command operation manual]. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template