redis commonly used commands on the key

All key query keys *

keys? query key all the individual characters

whether there exists k1 k1 the key

expire k1 5 k1 the key to survive five seconds, returns 1 for a set successfully, 0 is returned for setting failed

ttl k1 k1 Check this survival key, and returns the number of seconds, -1 to indicate valid forever, -2 indicates the return key does not exist

k1 k1 return type of data types, such as string

del k1 k1 delete this key, the successful return 1, else return 0

Published 236 original articles · won praise 10 · views 10000 +

Guess you like

Origin blog.csdn.net/gunsmoke/article/details/104995763