The above one is mostly for the processing of the ordered collection, here the common operation commands are introduced.
First, INCR : atomic operation Anti-concurrency , the key value from 1, if the non-numeric error , if there is no key, it is automatically created .
INCR Key Example: INCR myNum // If MyNum does not exist, it is initialized to 0 and self-increment to 1
Typical use: counters: such as statistical options, statistics page access, in-game recording scores
Limiter: Typical usage is to limit the number of requests that expose the API
Second, Incrby: ibid., increment a value from a key value
Incrby Key Increment example: incrby 8 //mynum self-increment 8, if non-numeric error.
- 3 on day, then execute the command INCR Peter::2012.3. A . You can extend this simple pattern in several ways: by combining INCR and EXPIRE, you can achieve the purpose of counting only within the specified lifetime (counting). The client can atomically get the current value of the counter and clear the counter by using the Getset command, for more information refer to the Getset command. With other self-increment /decrement operations, such as DECR and Incrby, users can increase or decrease the value of the counter by performing different actions, such as the use of these commands in the game's scoreboard.
Third, SCAN : Iterate the walker, return the array, the first element is the next cursor, the second element is the array of values traversed.
A cursor of 0 o'clock indicates that the traversal begins, and if the next cursor returned is 0 o'clock, the traversal is complete.
Parameter two:match: Similar to the one in MySQL, the filter function.
count: Iterating to an array of values
Redis Command Reference (ii)