Redis There are five data structures for , namely :String,Hash,list,set,zset. These five data structures have their own usage scenarios :

1. String
Some IP Addresses are visited frequently over a period of time , It's going to be blocked .Redis Medium String Data types can be accessed through Incrby Command records the number of visits .
2. Hash
Used to store user information [id,name,age];Hset{key,field,value}
for example :Hset{userKey,id,01}
Easy to modify , for example :Hget{userKey,id}
Why not String Type to store ?
Will userKey The corresponding values are all deserialized , Increased IO frequency , Reduced system performance .
3. List
Can achieve the latest news ranking ; It can also be used List Medium push The command exists the task list In the set , At the same time pop Command to remove the task from the collection .
Redis–List To simulate message queuing 【 This method can be used to complete a seckill activity in e-commerce 】
4. Set
It can discharge the weight automatically .
For example, in the microblog, everyone's friends exist Set In the set , Take the intersection of two people can find two people's common friends .
5. Zset
You can sort with a certain condition as the weight .
For example, the comprehensive ranking of e-commerce , You can also rank prices according to your own needs .

©2019-2020 Toolsou All rights reserved,
Java Swing JList: List box components Accurate mobile phone number capture , Big data of operators The difference between memory overflow and memory leak , Causes and Solutions Website mobile phone number capture method stay Vue Use in Web Worker3 species Python data structure ,13 Creation methods , This is the conclusion , Great ! What's the difference in server prices ? Basic definition and use of function ‘ To be continued SQL Server Database Glossary Chrome OS, For programmers and Windows What does it mean ? Internet Marketing