Four, Redis common commands

Source: Internet
Author: User

1) Key-value related commands

Keys returns all keys that satisfy the given pattern, with the expression * representing all keys removed

exists confirm if a key exists

Del Delete a key

Expire setting the expiration time for a key

TTL gets the effective duration of key (-1 indicates expired)

Move moves the key in the current database to a different database

Persist remove the expiration time for a given key

Randomkey randomly returns a key in the key space

Rename Rename key

Type of the return value of type

2) server-related commands

Ping tests if the connection is alive

Echo Prints some content on the command line

Select the database. Redis database number from 0~15.

Quit quit the connection.

Dbsize returns the number of keys in the current database.

Info Gets the information and statistics of the server.

Config get real-time upload of received requests.

FLUSHDB Delete all keys in the currently selected database

Flushall Delete all keys in all databases

Four, Redis common commands

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.