Redis_Keys common operations
Others
2021-03-29 05:57:25
views: null
1. View all keys
2. View the keys at the beginning of a field
-
keys field? For example: keys class? View, the keys at the beginning of the class field
3. Delete a key
-
del key1 、 key2 、 key3 ...
4. Determine whether a key exists
-
The exists key name returns (int) 1, if it does not exist, returns (int) 0
5. Rename a key
-
rename key name new key name
6. Add expiration time to the key
-
expire key name time (seconds)
7. Check the expiration time of a key
8. View the type of a key
Origin blog.csdn.net/weixin_43272542/article/details/112130563