1.string

Deposit session,session Store user's basic information , login time , user name ,vtypes,utypes; It is associated with the need for independent expiration time key Can be used string, such as mongo Of “ Function lock ”, For example, the general pop-up window needs to determine whether it has been played before ,mongo Lack of transaction similarity in itself select
for update Support for , So we'll use one redis Lock to determine whether there is a pop-up request in execution ;

2.hash surface

Has a common prefix , There is no independent overdue demand key, It can be used hash replace string, Can save memory and reduce string Of key easy redis recovery ; For example, the administrator can apply three times a day , The number of misjudgment of each administrator should not exceed 5 etc. , They are all big hash, For example police_daily_order_20180930, And then uid And the number of applications k
v; Trigger the script every night and delete it after saving ;

3.list

There are basically no use scenarios , For example, some people in the fresh stream and message queuing group think about it , Needless to say, the fresh stream is too troublesome to delete , Message queues are mainly redis The news of expensive memory and fear of not consuming in time ; Also want to use to control the second kill does not burst warehouse , If there is no personalized demand for each product, use it directly decrby That's fine ;

4.set

Never used it

5.zset

pvt For Leaderboard ;

6.hyperloglog

I've heard from grape that I used this statistic before uv, Number of machines ,ip Number, etc , And then he did it ;

Technology
©2019-2020 Toolsou All rights reserved,
C Review of basic language knowledge Go Language learning notes (GUI programming )Java Misunderstanding —— Method overloading is a manifestation of polymorphism ? How to achieve low cost and high stability for cloud native applications ?elementui Shuttle box el-transfer Display list content text too long C/C++ Memory model Element-Ui assembly Message Message prompt , alert Popup C# Making a simplified version of calculator Python In pycharm editor Interface style modification Tiktok refresh progress bar ( Two little balls turn ), The code is simple