Redis command string

Source: Internet
Author: User

$ keys * $ rename oldkey newkey $ renamex oldkey newkey new key exists thrown exception $ dbsize $ expire key time (seconds) $ TTL key return expiration time remaining number of seconds-2 A value that indicates that the key does not exist or has not been set for the remaining number of seconds $ select 0-15 defaults to 16 dictinary $ move Key Db-index $ flushdb clears all keys for the current library $ flushall clears all keys for all libraries $ setnx K EY value key exists to return 0, and does not change the original value; the value of $ getset key value is stored back key corresponding value, does not exist set value $ mget key1 key2 One returns multivalued list $ mset key value key Valu E is set multiple at a time, but does not overwrite the value of the key that already exists. $ incr key to key each add 1, does not exist then the first time for 1 $ decr key to key each plus 1, does not exist then the first time for-1 $ incrby Key IntegerValue increase the specified The value of $ Decrby key IntegerValue decreases by the specified value of $ append key value after the increment of the specified length value of $ substr key start end returns the key value of startindex (starting from 0), to Endi The value of the ndex (including the end index) does not change the original value corresponding to the key $lpush key value $rpush key value $llen $lrange key start end starts from 0 and end is negative to start from the back $ltr The IM key start end intercepts elements $lset key index value $lrem key count value removes count and value values from the key list, and count is 0 o'clock to delete all elements $lpop $rpop $ Blpop key1 key2 ... keyn timeout left-to-right scan returns a pair of first non-empty list for Lpop operation (also the return value), if all the list is empty or does not exist, then block timeout seconds, 0 for blocking $brpop Key1 key2 ... keyn timeout

Redis command string

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.