DELkey [key ...] summary: Delete a key since: 1.0.0
DUMPkey summary: Return a serialized version of the value stored at the specified key. since: 2.6.0
EXISTSkey [key ...] summary: Determine if a key exists since: 1.0.0
EXPIREkey seconds summary: Set a key's time to live in seconds since: 1.0.0
EXPIREATkey timestamp summary: Set the expiration for a key as a UNIX timestamp since: 1.2.0
KEYSpattern summary: Find all keys matching the given pattern since: 1.0.0
MIGRATEhost port key| destination-db timeout [COPY] [REPLACE] [KEYS key] summary: Atomically transfer a key from a Redis instance to another one. since: 2.6.0
MOVEkey db summary: Move a key to another database since: 1.0.0
OBJECTsubcommand [arguments [arguments ...]] summary: Inspect the internals of Redis objects since: 2.2.3
PERSISTkey summary: Remove the expiration from a key since: 2.2.0
PEXPIREkey milliseconds summary: Set a key's time to live in milliseconds since: 2.6.0
PEXPIREATkey milliseconds-timestamp summary: Set the expiration for a key as a UNIX timestamp specified in milliseconds since: 2.6.0
PTTLkey summary: Get the time to live for a key in milliseconds since: 2.6.0
RANDOMKEY- summary: Return a random key from the keyspace since: 1.0.0
RENAMEkey newkey summary: Rename a key since: 1.0.0
RENAMENXkey newkey summary: Rename a key, only if the new key does not exist since: 1.0.0
RESTOREkey ttl serialized-value [REPLACE] summary: Create a key using the provided serialized value, previously obtained using DUMP. since: 2.6.0
SCANcursor [MATCH pattern] [COUNT count] summary: Incrementally iterate the keys space since: 2.8.0
SORTkey [BY pattern] [LIMIT offset count] [GET pattern [GET pattern ...]] [ASC|DESC] [ALPHA] [STORE destination] summary: Sort the elements in a list, set or sorted set since: 1.0.0
TOUCHkey [key ...] summary: Alters the last access time of a key(s). Returns the number of existing keys specified. since: 3.2.1
TTLkey summary: Get the time to live for a key since: 1.0.0
TYPEkey summary: Determine the type stored at key since: 1.0.0
UNLINKkey [key ...] summary: Delete a key asynchronously in another thread. Otherwise it is just as DEL, but non blocking. since: 4.0.0
WAITnumreplicas timeout summary: Wait for the synchronous replication of all the write commands sent in the context of the current connection since: 3.0.0
POST...options... summary: Help not available since: not known
SUBSTRkey arg arg summary: Help not available since: not known
RESTORE-ASKINGkey arg arg ...options... summary: Help not available since: not known
HOST: ...options... summary: Help not available since: not known
PFDEBUGarg arg ...options... summary: Help not available since: not known
MODULEarg ...options... summary: Help not available since: not known
GEORADIUSBYMEMBER_ROkey arg arg arg ...options... summary: Help not available since: not known
XSETIDkey arg summary: Help not available since: not known
GEORADIUS_ROkey arg arg arg arg ...options... summary: Help not available since: not known
ASKING summary: Help not available since: not known
PSYNCarg arg summary: Help not available since: not known
REPLCONF...options... summary: Help not available since: not known
LATENCYarg ...options... summary: Help not available since: not known
PFSELFTEST summary: Help not available since: not known
LOLWUT...options... summary: Help not available since: not known
redis的位操作适用场景: 1.有用户系统,统计用户登录天数,且窗口随机,每个用户有366位数据,一天一个,用BITCOUNT算出多少天 setbit sean 1 1 setbit sean 7 1 setbit sean 364 1 STRLEN sean BITCOUNT sean -2 -1
BLPOPkey [key ...] timeout summary: Remove and get the first element in a list, or block until one is available since: 2.0.0
BRPOPkey [key ...] timeout summary: Remove and get the last element in a list, or block until one is available since: 2.0.0
BRPOPLPUSHsource destination timeout summary: Pop a value from a list, push it to another list and return it; or block until one is available since: 2.2.0
LINDEXkey index summary: Get an element from a list by its index since: 1.0.0
LINSERTkey BEFORE|AFTER pivot value summary: Insert an element before or after another element in a list since: 2.2.0
LLENkey summary: Get the length of a list since: 1.0.0
LPOPkey summary: Remove and get the first element in a list since: 1.0.0
LPUSHkey value [value ...] summary: Prepend one or multiple values to a list since: 1.0.0
LPUSHXkey value summary: Prepend a value to a list, only if the list exists since: 2.2.0
LRANGEkey start stop summary: Get a range of elements from a list since: 1.0.0
LREMkey count value summary: Remove elements from a list since: 1.0.0
LSETkey index value summary: Set the value of an element in a list by its index since: 1.0.0
LTRIMkey start stop summary: Trim a list to the specified range since: 1.0.0
RPOPkey summary: Remove and get the last element in a list since: 1.0.0
RPOPLPUSHsource destination summary: Remove the last element in a list, prepend it to another list and return it since: 1.2.0
RPUSHkey value [value ...] summary: Append one or multiple values to a list since: 1.0.0
RPUSHXkey value summary: Append a value to a list, only if the list exists since: 2.2.0
BZPOPMAXkey [key ...] timeout summary: Remove and return the member with the highest score from one or more sorted sets, or block until one is available since: 5.0.0
BZPOPMINkey [key ...] timeout summary: Remove and return the member with the lowest score from one or more sorted sets, or block until one is available since: 5.0.0
ZADDkey [NX|XX] [CH] [INCR] score member [score member ...] summary: Add one or more members to a sorted set, or update its score if it already exists since: 1.2.0
ZCARDkey summary: Get the number of members in a sorted set since: 1.2.0
ZCOUNTkey min max summary: Count the members in a sorted set with scores within the given values since: 2.0.0
ZINCRBYkey increment member summary: Increment the score of a member in a sorted set since: 1.2.0
ZINTERSTOREdestination numkeys key [key ...] [WEIGHTS weight] [AGGREGATE SUM|MIN|MAX] summary: Intersect multiple sorted sets and store the resulting sorted set in a new key since: 2.0.0
ZLEXCOUNTkey min max summary: Count the number of members in a sorted set between a given lexicographical range since: 2.8.9
ZPOPMAXkey [count] summary: Remove and return members with the highest scores in a sorted set since: 5.0.0
ZPOPMINkey [count] summary: Remove and return members with the lowest scores in a sorted set since: 5.0.0
ZRANGEkey start stop [WITHSCORES] summary: Return a range of members in a sorted set, by index since: 1.2.0
ZRANGEBYLEXkey min max [LIMIT offset count] summary: Return a range of members in a sorted set, by lexicographical range since: 2.8.9
ZRANGEBYSCOREkey min max [WITHSCORES] [LIMIT offset count] summary: Return a range of members in a sorted set, by score since: 1.0.5
ZRANKkey member summary: Determine the index of a member in a sorted set since: 2.0.0
ZREMkey member [member ...] summary: Remove one or more members from a sorted set since: 1.2.0
ZREMRANGEBYLEXkey min max summary: Remove all members in a sorted set between the given lexicographical range since: 2.8.9
ZREMRANGEBYRANKkey start stop summary: Remove all members in a sorted set within the given indexes since: 2.0.0
ZREMRANGEBYSCOREkey min max summary: Remove all members in a sorted set within the given scores since: 1.2.0
ZREVRANGEkey start stop [WITHSCORES] summary: Return a range of members in a sorted set, by index, with scores ordered from high to low since: 1.2.0
ZREVRANGEBYLEXkey max min [LIMIT offset count] summary: Return a range of members in a sorted set, by lexicographical range, ordered from higher to lower strings. since: 2.8.9
ZREVRANGEBYSCOREkey max min [WITHSCORES] [LIMIT offset count] summary: Return a range of members in a sorted set, by score, with scores ordered from high to low since: 2.2.0
ZREVRANKkey member summary: Determine the index of a member in a sorted set, with scores ordered from high to low since: 2.0.0
ZSCANkey cursor [MATCH pattern] [COUNT count] summary: Incrementally iterate sorted sets elements and associated scores since: 2.8.0
ZSCOREkey member summary: Get the score associated with the given member in a sorted set since: 1.2.0
ZUNIONSTOREdestination numkeys key [key ...] [WEIGHTS weight] [AGGREGATE SUM|MIN|MAX] summary: Add multiple sorted sets and store the resulting sorted set in a new key since: 2.0.0